-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] why use library mode to bundle main process #249
Comments
Just because the |
kingyue737
changed the title
[Question] why use library mode to bundle main and renderer process
[Question] why use library mode to bundle main process
Sep 18, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This plugin uses library mode to bundle the main
and rendererprocess. I wonder what the considerations are.vite-plugin-electron/src/utils.ts
Line 30 in f6dabc3
Firstly, Vite library mode includes opinionated configuration for browser-oriented libraries which may not suitable for the main and renderer processes which are not modules to be imported by other modules.
Secondly, if the output is ESM, it won't be minified (white spaces are kept) in lib mode, which is a long-lived issue of Vite.
In my opinion, directly using rollup to bundle may be a better choice like stated in https://vitejs.dev/guide/backend-integration.html
For example
The text was updated successfully, but these errors were encountered: