Skip to content
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: enable magic HTML routes for module output #3773

Closed
wants to merge 18 commits into from

Conversation

snitin315
Copy link
Member

  • This is a bugfix
  • This is a feature
  • This is a code refactor
  • This is a test update
  • 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

lib/Server.js Outdated Show resolved Hide resolved
@snitin315 snitin315 closed this Sep 2, 2021
@snitin315 snitin315 reopened this Sep 2, 2021
@snitin315 snitin315 changed the title fix: enable magic HTML routes for .mjs output fix: enable magic HTML routes for module output Sep 2, 2021
lib/Server.js Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Sep 2, 2021

Codecov Report

Merging #3773 (512a3d7) into master (db24b16) will decrease coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            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%) ⬆️
lib/servers/WebsocketServer.js 91.42% <0.00%> (-5.72%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update db24b16...512a3d7. Read the comment docs.

@snitin315 snitin315 force-pushed the fix-magic-html-mjs branch 5 times, most recently from dfeaedd to 48ce71d Compare September 4, 2021 00:50
Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add test for multi compiler mode?

@snitin315
Copy link
Member Author

Something wrong with Node 12 and MacOS, looking into it.

@snitin315 snitin315 force-pushed the fix-magic-html-mjs branch 2 times, most recently from f87803b to c269184 Compare September 10, 2021 09:57
@alexander-akait
Copy link
Member

@snitin315 let's finish

@snitin315 snitin315 force-pushed the fix-magic-html-mjs branch 3 times, most recently from bded569 to 620ea64 Compare September 16, 2021 10:04
@snitin315
Copy link
Member Author

It seems #3840 broke the magic HTML feature for multi-compiler mode.

/cc @alexander-akait

@alexander-akait
Copy link
Member

Can you provide example?

@snitin315
Copy link
Member Author

  • cd examples/magic-html
  • update webpack.config.js as
- 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

@snitin315
Copy link
Member Author

I think it is specific to this PR only, I am looking into it.

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add test for publicPath

lib/Server.js Outdated Show resolved Hide resolved
lib/Server.js Outdated Show resolved Hide resolved
@snitin315
Copy link
Member Author

Please add test for publicPath

output.publicPath or static.publicPath. Also, what should be the expected behavior?

@snitin315
Copy link
Member Author

removed in v5

@snitin315 snitin315 closed this May 30, 2023
@snitin315 snitin315 deleted the fix-magic-html-mjs branch May 30, 2023 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants