mirror of
https://github.com/imputnet/cobalt.git
synced 2025-01-04 06:06:07 +00:00
web/build: merge i18n chunks for each language into one file
This commit is contained in:
parent
44065454a0
commit
1b39545007
|
@ -5,6 +5,20 @@ export default defineConfig({
|
|||
plugins: [
|
||||
sveltekit()
|
||||
],
|
||||
build: {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: (id) => {
|
||||
if (id.includes('/web/i18n')) {
|
||||
const lang = id.split('/web/i18n/')?.[1].split('/')?.[0];
|
||||
if (lang) {
|
||||
return `i18n_${lang}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
server: {
|
||||
fs: {
|
||||
allow: [
|
||||
|
|
Loading…
Reference in a new issue