Skip to content

feat(vite): support nodeIntegration renderer builds#4258

Open
rafael81 wants to merge 1 commit into
electron:mainfrom
rafael81:feat/vite-node-integration-renderer
Open

feat(vite): support nodeIntegration renderer builds#4258
rafael81 wants to merge 1 commit into
electron:mainfrom
rafael81:feat/vite-node-integration-renderer

Conversation

@rafael81
Copy link
Copy Markdown

Refs #3961

Summary

  • add a nodeIntegration option to @electron-forge/plugin-vite renderer entries
  • when enabled, externalize Electron/Node built-ins for renderer builds and resolve packages with Node-oriented conditions/main fields
  • document the new renderer option in the Vite plugin README
  • add ViteConfig coverage for the default renderer path and the new nodeIntegration: true path

Validation

$ npm exec --yes @yarnpkg/cli-dist@4.10.3 -- prettier --write packages/plugin/vite/src/Config.ts packages/plugin/vite/src/config/vite.renderer.config.ts packages/plugin/vite/spec/ViteConfig.spec.ts packages/plugin/vite/README.md --experimental-cli
# passed

$ npm exec --yes @yarnpkg/cli-dist@4.10.3 -- vitest run --project fast packages/plugin/vite/spec/ViteConfig.spec.ts
Test Files  1 passed (1)
Tests  4 passed (4)

$ npm exec --yes @yarnpkg/cli-dist@4.10.3 -- tsc -b packages/plugin/vite
# passed

This PR was prepared with AI assistance and manually reviewed before submission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant