vite-plugin-federation
vite-plugin-federation copied to clipboard
Vue SSR - Entry module cannot be external
Versions
- vite-plugin-federation: 1.3.2
- vite: 4.0.3
Reproduction
anyone had to tried vikejs-ssr
federation({ ... shared: ["vue"] })
the build command of vite build produced an error below. But, if shared: ['vue']
was removed, the build was succeed, but the reactive of vue doesn't work :/
Entry module "vue" cannot be external.
Steps to reproduce
- Clone repo https://github.com/reiyanyan/vite-ssr-federation.git
- Trying to run build or dev
-
vite.config
with or withoutshared:['vue']
What is Expected?
running well with reactivity of shared vue
What is actually happening?
getting error while buildiing with shared vue
I have same problem
Same problem with react
and react-dom
in shared.
Config:
federation({
name: 'user',
filename: 'remoteEntry.js',
exposes: {
'./Profile': './src/Profile.tsx',
},
shared: ["react", "react-dom"]
})
I have the same problem.
The config should allow something like that :
federation({
name: 'my-federation-entry',
filename: 'remoteEntry.js',
exposes: {
'./A': './src/A.tsx',
},
shared: ["some-shared-lib" ],
externals: {
react: "React",
'react-dom' : "ReactDOM",
}
})
I have the same issue.
Hi, I have the same problem as well, I would really appreciate any help!