mirror of
https://github.com/imputnet/cobalt.git
synced 2025-01-21 06:01:40 +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: [
|
plugins: [
|
||||||
sveltekit()
|
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: {
|
server: {
|
||||||
fs: {
|
fs: {
|
||||||
allow: [
|
allow: [
|
||||||
|
|
Loading…
Reference in a new issue