Although the base path was set, after the build, the exposed module is still using a relative path.
baijunjie opened this issue · 0 comments
baijunjie commented
Versions
- vite-plugin-federation: 1.3.6
- vite: 5.2.9
Reproduction
vite.config.js
{
base: 'https://cdn.example.com/static-assets',
plugins: [
federation({
name: 'pages',
filename: 'remote.js',
exposes: {
'./preload': './src/preload',
},
})
],
}
After the build
remote.js
...
let n={"./preload":()=>(c("./__federation_expose_Preload-CX6HpEAp.js")
...
What is Expected?
After the build
remote.js
...
let n={"./preload":()=>(c("[.](https://cdn.example.com/static-assets/__federation_expose_Preload-CX6HpEAp.js")
...
I checked the documentation but couldn’t find an option related to setting the file access path for exposed modules. I’m not sure if this is a bug or if I missed some configuration?