We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello
I have a problem with connecting two Vue (version 3.2.31) applications from vue-cli (version 5.0.1) by module-federation (vuejs/vue-cli#6823 and #307)
Somebody can add a working example to this repo?
Example fust bootstrap
npm install -g @vue/[email protected]; vue create vue3-cli-demo --default; cd vue3-cli-demo; npm i [email protected] --save-dev;
src/index.js
import('./main');
vue.config.js (need to do something with this)
const { defineConfig } = require('@vue/cli-service') const webpack = require('webpack') module.exports = defineConfig({ pages: { index: { entry: './src/index.js', }, }, configureWebpack: { plugins: [ new webpack.container.ModuleFederationPlugin({ name: 'vue_cli_demo', filename: 'remoteEntry.js', exposes: { './HelloWorld.vue': './src/components/HelloWorld.vue', }, // eslint-disable-next-line global-require // shared: require('./package.json').dependencies, shared: { vue: { singleton: true, }, }, }), ], }, transpileDependencies: true })
and for host same steps
vue.config.js
module.exports = defineConfig({ // ... plugins: [ new webpack.container.ModuleFederationPlugin({ name: 'other_project', filename: 'remoteEntry.js', remotes: { vue_cli_demo: 'vue_cli_demo@http://localhost:8080/remoteEntry.js', }, shared: { /*...*/ } }, }), ], }, });
and somewhere in project
const HelloWorld = defineAsyncComponent(() => import('vue_cli_demo/HelloWorld.vue'));
The text was updated successfully, but these errors were encountered:
publicPath: 'auto'
a worked example is merged https://github.com/module-federation/module-federation-examples/tree/master/vue3-cli-demo
Sorry, something went wrong.
No branches or pull requests
Hello
I have a problem with connecting two Vue (version 3.2.31) applications from vue-cli (version 5.0.1) by module-federation (vuejs/vue-cli#6823 and #307)
Somebody can add a working example to this repo?
Example fust bootstrap
src/index.js
vue.config.js (need to do something with this)
and for host same steps
vue.config.js
and somewhere in project
The text was updated successfully, but these errors were encountered: