ESBuildMinifyPlugin with format: iife breaks Webpack Module Federation
See original GitHub issueBug description
ESBuildMinifyPlugin with format: iife
breaks Webpack Module Federation
Same error if you set format: iife
in parent/child MF project.
Reproduction
With format: iife
you get error after button click:
https://codesandbox.io/s/webpack-module-federation-forked-rcl1v3?file=/comic/webpack.config.js
Without format: iife
you don’t get error after button click:
https://codesandbox.io/s/webpack-module-federation-forked-c7fo45?file=/comic/webpack.config.js
Node.js package manager
npm
Environment
Checkout codesandbox
Can you contribute a fix?
- I’m interested in opening a pull request for this issue.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
bug: minifier used to transpile pollutes global scope ... - GitHub
I've got another problem with format: 'iife' - it breaks Webpack Module Federation :D #258 ...
Read more >Module Federation - webpack
This object is used as a shared scope in the remote container and is filled with the provided modules from a host. It...
Read more >Tutorial - A Guide to Module Federation for Enterprise
This plugin by Module Federation Author Zack Jackson allows for tapping into the Webpack MutateRuntime compilation hook to mutate publicPath ...
Read more >Webpack module federation is not working with eager shared ...
I was looking into Webpack 5 Module federation feature, and have some trouble understanding why my code does not work.
Read more >Getting Started with Module Federation - YouTube
Learn all about this exciting new way to share code between web applications. This is a code level walkthrough where you get to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@privatenumber I don’t want to have some global variables in window. I’ve got a bug with window._ intersection before…
I didn’t know but used it as transpiler 😃 I missed node_modules when was building with
esbuild-loader
And then minifier transpiled my...spread
syntax with global functions.So it’s okay to run without
iife
, but you should transpile all .js like files like this: