mirror of
https://github.com/imputnet/cobalt.git
synced 2024-12-29 11:06:10 +00:00
31 lines
763 B
TypeScript
31 lines
763 B
TypeScript
import { sveltekit } from "@sveltejs/kit/vite";
|
|
import { defineConfig, searchForWorkspaceRoot } from "vite";
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
sveltekit()
|
|
],
|
|
build: {
|
|
target: "esnext",
|
|
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())
|
|
]
|
|
}
|
|
}
|
|
});
|