refactor: module federation #4

Merged
Sebastian merged 1 commits from refactor/module-federation into main 2026-02-22 21:48:54 +00:00
Showing only changes of commit afa5aafe03 - Show all commits

View File

@@ -34,7 +34,6 @@ export default defineConfig({
outDir: 'static',
emptyOutDir: true,
sourcemap: true,
cssCodeSplit: false,
lib: {
entry: path.resolve(__dirname, 'src/main.ts'),
formats: ['es'],
@@ -45,16 +44,24 @@ export default defineConfig({
'vue',
'vue-router',
'pinia',
'@KTXC',
/^@ChronoManager\//,
],
output: {
paths: (id) => {
if (id === '@KTXC') return '/js/ktxc.mjs'
if (id.startsWith('@ChronoManager/')) {
return '/modules/chrono_manager/static/module.mjs'
}
return id
},
assetFileNames: (assetInfo) => {
if (assetInfo.name?.endsWith('.css')) {
return 'chrono-[hash].css'
}
return '[name]-[hash][extname]'
},
manualChunks: undefined,
},
}
}
},
},
})