vue.js – Error config Micro Frontend with Vue Cli version 5.0.0

I have issue about config micro frontend with vue cli and module federation of webpack,
first project config:
configureWebpack: { entry: path.resolve(__dirname, './src/index.js'), optimization: { minimize: false, splitChunks: false }, devServer:{ port: 8080 }, plugins: [ new ModuleFederationPlugin({ name: "escort", filename: "remoteEntry.js", remotes: { "secuprint": "secuprint@http://localhost:8081/remoteEntry.js" }, exposes: {}, shared: require('./package.json').dependencies }) ] },
second project config:
configureWebpack: { devtool: 'source-map', devServer:{ port: 8081 }, entry: './src/index.js', optimization: { minimize: false }, resolve: { extensions: ['.vue', '.jsx', '.js', '.json'], }, plugins: [ new ModuleFederationPlugin({ name: 'secuprint', filename: 'remoteEntry.js', remotes: { secuprint: 'secuprint@http://localhost:8081/remoteEntry.js', }, exposes: { './main': './src/example', }, shared: require('./package.json').dependencies }), ] }
when I run project it return response:
ScriptExternalLoadError: Loading script failed. (missing: http://localhost:8081/remoteEntry.js) while loading "./main" from webpack/container/reference/secuprint
Anyone can help me resolve this issue? I try to use splitChucks: false but it return
“ChunkLoadError: Loading chunk node_modules_vue_dist_vue_runtime_esm-bundler_js failed.”

Read more here: Source link