mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 12:50:01 +00:00
web/build: merge i18n chunks for each language into one file
This commit is contained in:
parent
422b907703
commit
e98f76c8ee
1 changed files with 14 additions and 0 deletions
|
@ -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