Eve/vite.config.ts
2025-02-20 19:28:48 +01:00

39 lines
969 B
TypeScript

import { fileURLToPath, URL } from "node:url";
import { defineConfig } from "vite";
import { resolve } from "path";
export default defineConfig({
plugins: [],
build: {
target: "es2024",
outDir: "dist",
rollupOptions: {
input: {
main: resolve(__dirname, "index.html"),
},
},
},
resolve: {
alias: {
"@utils": fileURLToPath(new URL("./src/utils", import.meta.url)),
"@routes": fileURLToPath(new URL("./src/routes", import.meta.url)),
"@styles": fileURLToPath(new URL("./src/styles", import.meta.url)),
"@widgets": fileURLToPath(
new URL("./src/components/Widgets", import.meta.url)
),
"@components": fileURLToPath(
new URL("./src/components", import.meta.url)
),
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
server: {
port: 5173,
open: true,
},
optimizeDeps: {
esbuildOptions: {
target: "es2024",
},
},
});