liady / webpack-node-externals

Easily exclude node modules in Webpack
MIT License
1.3k stars 62 forks source link

fix: Add support for webpack 5 module federation references #92

Closed jacob-ebey closed 3 years ago

jacob-ebey commented 3 years ago

Without this webpack tries to import an external called "webpack/container/reference/xxx" that does not exist when referencing a federated remote.

jacob-ebey commented 3 years ago

@liady Feel free to ship this at any point.

jacob-ebey commented 3 years ago

@liady Please get this merged so I stop getting the same "my node bundle doesn't work" comment.

liady commented 3 years ago

@jacob-ebey yes, planning to, just thinking about how to do it in a generic way, and add a test. Do you know if it breaks webpack < 5 compatibility? This might have to be a major version change.

jacob-ebey commented 3 years ago

Should be fine. webpack/container/reference/xxx was chosen because it's stupid unlikely anyone has created npm modules or aliased anything as such. Major version is fine with me if it makes you feel more comfortable. No tears on this end, I just want to see this release so I stop getting the same comments / questions.

ScriptedAlchemy commented 3 years ago

@liady please consider merging this in

liady commented 3 years ago

@jacob-ebey @ScriptedAlchemy added to webpack-node-externals@3.0.0, please check if it solves it.

liady commented 3 years ago

Closing this as it should be resolved in version 3.0.0, let me know if it doesn't work.