module-federation-examples
module-federation-examples copied to clipboard
Dynamically loading remoteEntry
Now i have only one container app and having the following configuration:
new ModuleFederationPlugin({
name: "container",
filename: "remoteEntry.js",
exposes: {
"./utils": "./src/utils.js",
},
shared: {
vue: { singleton: true },
},
}),
I want to dynamically loading remoteEntry.js file, but it seems to directly inserted into the HTML.
I want to control the cache through timestamp(?v=[Date.now]), how can i do?
Looks like you need to look the configuration of the HTMLWebpackPlugin to see how it's generating your HTML. In that configuration you might be able to specify a timestamp as query param...
look at runtime-plugins folder in here, you can write runtime plugin to do stuff like that. look at module-federation/enhanced