mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-16 03:40:37 +08:00
29 lines
684 B
TypeScript
29 lines
684 B
TypeScript
import path from "path";
|
|
import { UserConfig } from "vite";
|
|
import svelte from "@sveltejs/vite-plugin-svelte";
|
|
import rewriteAll from "vite-plugin-rewrite-all";
|
|
|
|
const config: UserConfig = {
|
|
optimizeDeps: {
|
|
exclude: ['svelte-routing']
|
|
},
|
|
plugins: [svelte(), rewriteAll()],
|
|
resolve: {
|
|
alias: {
|
|
"@app": path.resolve("./src"),
|
|
// Polyfill for Node.js "stream" library.
|
|
"stream": path.resolve("./src/polyfills/stream.ts"),
|
|
},
|
|
},
|
|
define: {
|
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
"process.env": { READABLE_STREAM: "disable" }
|
|
},
|
|
build: {
|
|
outDir: "build",
|
|
sourcemap: true
|
|
}
|
|
};
|
|
|
|
export default config;
|