webpack-dev-server
webpack-dev-server copied to clipboard
fix: enable magic HTML routes for `module` output
- [x] This is a bugfix
- [ ] This is a feature
- [ ] This is a code refactor
- [x] This is a test update
- [x] This is a docs update
- [ ] This is a metadata update
For Bugs and Features; did you add new tests?
Yes
Motivation / Use-Case
enable magic HTML routes for .mjs output.
Breaking Changes
None
Additional Info
No
Codecov Report
Merging #3773 (512a3d7) into master (db24b16) will decrease coverage by
0.06%. The diff coverage is100.00%.
@@ Coverage Diff @@
## master #3773 +/- ##
==========================================
- Coverage 92.78% 92.72% -0.07%
==========================================
Files 14 14
Lines 1345 1360 +15
Branches 467 470 +3
==========================================
+ Hits 1248 1261 +13
- Misses 90 92 +2
Partials 7 7
| Impacted Files | Coverage Δ | |
|---|---|---|
| lib/Server.js | 93.69% <100.00%> (+0.09%) |
:arrow_up: |
| lib/servers/WebsocketServer.js | 91.42% <0.00%> (-5.72%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update db24b16...512a3d7. Read the comment docs.
Something wrong with Node 12 and MacOS, looking into it.
@snitin315 let's finish
It seems https://github.com/webpack/webpack-dev-server/pull/3840 broke the magic HTML feature for multi-compiler mode.
/cc @alexander-akait
Can you provide example?
- cd examples/magic-html
- update
webpack.config.jsas
- module.exports = setup({
+ module.exports = [setup({
context: __dirname,
entry: "./app.js",
devServer: {
magicHtml: true,
},
- });
+ })];
npx webpack serve --open- go to
localhost:8080/main->Can't get main
I think it is specific to this PR only, I am looking into it.
Please add test for publicPath
output.publicPath or static.publicPath. Also, what should be the expected behavior?
removed in v5