Replies: 4 comments
-
I would like a way to do this as well. For now I'm working around it by using an empty |
Beta Was this translation helpful? Give feedback.
-
Another workaround I've found, since I'm using the Webpack compiler API, is to just pass a nonexistent file for |
Beta Was this translation helpful? Give feedback.
-
Related question: module-federation/core#2385 |
Beta Was this translation helpful? Give feedback.
-
How would you configure the generation of hashed names for 66.js and 393.js bundles but not for remoteEntry.js? |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm working on a micro frontend architectured application and I was wondering if it was possible to only build the exposed modules and the remote container entry.
The background of this is that we have a lot of different components (each component is a build/container) that each export a certain number of modules. Those containers are not meant to be run "alone" but always within the Base container so they are always referenced as remotes from the Base.
Here is an example Webpack Config of the
dashboard
component which exposes a moduleDashboard
with the same name:I'm building the component using
webpack --mode production --config ./webpack.config.ts
.Now webpack produces the following files:
When looking into
remoteEntry.js
I can see that66.js
and393.js
are referenced but341.js
is not.On the other hand
main.js
references341.js
and393.js
but not66.js
.I don't quite understand the difference between
66.js
and341.js
but it seems that the later is the "non-module-federation" module.Both of them seem to do the same thing.
From my understanding, the numbered files are the modules and main.js is the "non-module-federation" entrypoint of the build where modules are evaluated directly.
Because we are only using the components via module federation remotes, I think we don't need all those non-module-federation files (
main.js
&341.js
) and it would be superfluous to deploy them.Is there a way to not generate them in the first place?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions