-
Notifications
You must be signed in to change notification settings - Fork 166
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
Is externalizeDepsPlugin
taking modules dependencies into accounts ?
#71
Comments
For the main process and preload scripts, the best practice is to externalize dependencies and only bundle our own code. It is important to note that some modules that only support ESM, we should not externalize it. We should let electron-vite bundle it into a CJS standard module to support Electron. For renderers, it is usually fully bundle, so dependencies are best installed in |
So that I understand, but what about dependencies of dependencies ? When bundling my app I found that they were not packaged by electron-builder. Current workaround is adding them manually to the root package.json but this is inconvenient. |
|
You were right this is because I use pnpm and there is currently a bug : electron-userland/electron-builder#6792 (comment) Thank you. |
If you want to use |
Describe the bug
I might just misunderstand how the plugin works but I find that dependencies in package.json are correctly externalised, but not their dependencies, forcing me to add each and every one of them to my package.json.
Is it intended behaviour ?
Electron-Vite Version
1.0.15
Electron Version
22.0.0
Vite Version
3.2.5
Validations
The text was updated successfully, but these errors were encountered: