2024-06-13 09:32:17 +00:00
|
|
|
import { sveltekit } from "@sveltejs/kit/vite";
|
2024-07-02 18:16:03 +00:00
|
|
|
import { defineConfig, searchForWorkspaceRoot } from "vite";
|
2024-06-13 09:32:17 +00:00
|
|
|
|
|
|
|
export default defineConfig({
|
2024-07-02 18:16:03 +00:00
|
|
|
plugins: [
|
|
|
|
sveltekit()
|
|
|
|
],
|
2024-07-04 22:15:15 +00:00
|
|
|
build: {
|
2024-07-10 18:05:29 +00:00
|
|
|
target: "esnext",
|
2024-07-04 22:15:15 +00:00
|
|
|
rollupOptions: {
|
|
|
|
output: {
|
|
|
|
manualChunks: (id) => {
|
|
|
|
if (id.includes('/web/i18n')) {
|
|
|
|
const lang = id.split('/web/i18n/')?.[1].split('/')?.[0];
|
|
|
|
if (lang) {
|
|
|
|
return `i18n_${lang}`;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-07-02 18:16:03 +00:00
|
|
|
server: {
|
|
|
|
fs: {
|
|
|
|
allow: [
|
|
|
|
searchForWorkspaceRoot(process.cwd())
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
2024-06-13 09:32:17 +00:00
|
|
|
});
|