mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 04:39:58 +00:00
2c1bd50e70
This reverts commit 842f91ec54
.
30 lines
737 B
TypeScript
30 lines
737 B
TypeScript
import { sveltekit } from "@sveltejs/kit/vite";
|
|
import { defineConfig, searchForWorkspaceRoot } from "vite";
|
|
|
|
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: [
|
|
searchForWorkspaceRoot(process.cwd())
|
|
]
|
|
}
|
|
}
|
|
});
|