Adding and then removing `manualChunks` causes runtime error
echjordan0 opened this issue · 0 comments
echjordan0 commented
Versions
- vite-plugin-federation: v1.1.8
- vite: 2.9.16
Reproduction
Additional Details
Steps to reproduce
- Add a manual chunk in the remote's Vite config (it does not seem library specific but I was chunking a PDF library) and build
rollupOptions: {
output: {
manualChunks: {
'vue-pdf-embed/dist/vue2-pdf-embed': ['vue-pdf-embed/dist/vue2-pdf-embed'],
},
},
},
- Later remove this piece of the config bc you no longer want to create a separate chunk
- Build for production
- Try to fetch the remote receive the following error:
Interestingly, I can work around this error by changing the config to
rollupOptions: {
output: {
manualChunks: {},
},
},
But it seems very strange that I'd need to do so. Perhaps it's not properly cleaning up the options when they're removed entirely?
Thank you!