logue/vite-vue2-vuetify-ts-starter

feature request: module federation

ngjuping opened this issue · 1 comments

This template worked fine for our corporation for months, a huge thanks from me and the team! However, we have now come to a stage where we need to develop functionalities independently. I have heard and dug into this term "module federation" as a paradigm for frontend micro-service, and I was wondering if there's any possibility that an integration of the "vite-plugin-federation" library into this framework is possible.

TLDR: Any suggestion or possible upgrades in the future such that frontend microservice paradigm is possible?

Best regards,
JU PING

logue commented

I've only skimmed vite-plugin-federation, but I think it probably won't work properly unless you unset manualChunks in vite.config.ts.

manualChunks: {
// Split external library from transpiled code.
vue: [
'vue',
'vue-router',
'vue-router/composables',
'vuex',
'vuex-persist',
'deepmerge',
'@logue/vue2-helpers',
'@logue/vue2-helpers/teleport',
'@logue/vue2-helpers/vue-router',
'@logue/vue2-helpers/vuex',
],
vuetify: [
'vuetify/lib',
'@logue/vue2-helpers/vuetify',
'webfontloader',
],
materialdesignicons: ['@mdi/font/css/materialdesignicons.css'],
},