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
add experimental WebAssembly support #5945
Conversation
added json type .mjs default to javascript/esm type adjusted parser plugins to react on module type
Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon. |
Hi, I have been experimenting with this branch. It seems to build fine but webpack-dev-server is unable to run it. The .module.wasm gets served as application/octet-stream instead of application/wasm. First the mime module does not know the .wasm extension and secondly the middleware.js appends "; charset=UTF-8" to all content types which it should not do for wasm. |
Thanks for this. I'm going to have @shellscape dig into this specifically for WDS/WDM |
Once this is merged we'll have to setup a test in WDS that fails and I can work backwards from there. I don't have any web assembly experience so I'm not sure how to setup that up at the moment. |
@rhmoller, do you have interest in assisting @shellscape with setting this up? It would be very beneficial to have the support for WDS aw soon as possible even if it merges only to the webpack/webpack#next branch. |
Sure, I would love to help moving this forward. |
I have a created an issue for the dev-server issue here. I will add details and work on a pull request there. |
What kind of change does this PR introduce?
feature
Did you add tests for your changes?
yes
If relevant, link to documentation update:
TODO
Summary
add
Module.type
add wasm, json, js/auto and js/esm types
allow to set type by rules
set default type by extension
allow Main/ChunkTemplate to generate multiple assets
add more parsers for different types
parser plugins should now add by module type
Does this PR introduce a breaking change?
yes
Other information