forge
forge copied to clipboard
feat(plugin-webpack): customize `HtmlWebpackPlugin` options
- [x] I have read the contribution documentation for this project.
- [x] I agree to follow the code of conduct that this project follows, as appropriate.
- [x] The changes are appropriately documented (if applicable).
- [x] The changes have sufficient test coverage (if applicable).
- [x] The testsuite passes successfully on my local machine (if applicable).
Summarize your changes:
This changeset adds options to entrypoints to support customized operation of the HtmlWebpackPlugin. See below for full changeset.
Changes enclosed:
- Add properties for
output,htmlPlugins, andhtmlOptionstoWebpackPluginEntryPoint - Use new options from
Config.ts, by merging them into their expected places
Fixes and closes electron-userland/electron-forge#2968.
i see what seems like a flaky test locally (unrelated), and i'm unclear about how i might reach into the HtmlWebpackPlugin to test some of these options, so i left it at a test for output. i'm happy to amend to update docs and tests.
Codecov Report
Merging #2969 (6565ca7) into main (362099a) will increase coverage by
0.03%. The diff coverage is100.00%.
@@ Coverage Diff @@
## main #2969 +/- ##
==========================================
+ Coverage 73.80% 73.84% +0.03%
==========================================
Files 66 66
Lines 2142 2145 +3
Branches 424 427 +3
==========================================
+ Hits 1581 1584 +3
Misses 356 356
Partials 205 205
| Impacted Files | Coverage Δ | |
|---|---|---|
| packages/plugin/webpack/src/WebpackConfig.ts | 98.76% <100.00%> (+0.04%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 362099a...6565ca7. Read the comment docs.
i should also say, @MarshallOfSound, i have some background material on the linked issue, #2698. the alternatives listed there were considered but imagined to be suboptimal. thank you for all your hard work on this library, and for the lightning fast review -- it makes working with Electron so easy and smooth!
accidental close (fat thumb)
What is blocking this PR from beeing merged? It would be very useful for us 🙏🏼
Hi, Can we expect to have something merge on this? I bet it will be useful for a lot of us, and it could helps to send our own variables to our template, which is not the cas as of today. thanks,