Open seshu-uggina opened 1 month ago
+1
I have added tempaory fix in my appllication configuration to reslove this issue. here the code that i have added in my webpack configuration plugin section
new webpack.ContextReplacementPlugin(/@module-federation\/utilities/, path.resolve(__dirname, 'node_modules/@module-federation/utilities/dist/index.cjs'), { // Provide context options if needed },),
Dont use utilities, its dead, use the runtime package and loadRemote etc
@ScriptedAlchemy could it be a good idea to add some workaround/examples for loading the exact module via loadRemote
? It seems, that documentation is not that clear for everyone.
I am using the module from the remote entry, which I am currently loading via importRemote
. However, I have not figured out how to use the loadRemote
for my case, and I have not found any examples on github as well.
the module federation website shows examples of the runtime. Also dynamic remote or advanced api should as well in examples repo.
Describe the bug
I encountered a critical dependency warning related to a dynamic import while using the @module-federation/utilities package. This warning appears during the build process with Webpack.
WARNING in ../node_modules/@module-federation/utilities/dist/index.cjs.js 804:52-62 Critical dependency: the request of a dependency is an expression
Reproduction
Install @module-federation/utilities in your project. Configure Webpack to build the project. Run the build process. Observe the warning in the console output.
Used Package Manager
yarn
System Info
Validations