-
-
Notifications
You must be signed in to change notification settings - Fork 487
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
fix(plugin-webpack): prevent the renderer config from overriding its preload config's target #1853
Conversation
while merging to create a Webpack config for preload script, made the target from the renderer config ignored and manually set to `electron-preload`
any better ways to fix this? @malept @MarshallOfSound |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems OK, although I don't know if there are legitimate use cases to override the preload's target.
Can you add a test for this in packages/plugin/webpack/test/WebpackConfig_spec.ts
?
sure, will do. 👍 |
Added 3 tests - Renderer config : generates config with custom target - web - Preload renderer config : generates a production config - Preload renderer config : generates config overriding custom target with 'electron-preload'
@malept, added some tests, please have a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems fine, but I have suggestions for making the new tests smaller.
Codecov Report
@@ Coverage Diff @@
## master #1853 +/- ##
=======================================
Coverage 72.71% 72.71%
=======================================
Files 74 74
Lines 2210 2210
Branches 416 416
=======================================
Hits 1607 1607
Misses 443 443
Partials 160 160
Continue to review full report at Codecov.
|
override preload script webpack target to electron-preload
Summarize your changes:
while merging to create a Webpack config for preload script, made the target from the renderer config ignored and manually set to
electron-preload
Fixes #1852