forked from franciscoBSalgueiro/en-croissant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
33 lines (31 loc) · 920 Bytes
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/// <reference types="vitest" />
import { resolve } from "node:path";
import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
import react from "@vitejs/plugin-react-swc";
import { TanStackRouterVite } from "@tanstack/router-vite-plugin";
import { defineConfig } from "vite";
const isDebug = !!process.env.TAURI_ENV_DEBUG;
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), vanillaExtractPlugin(), TanStackRouterVite()],
server: {
port: 1420,
},
build: {
minify: isDebug ? false : "esbuild",
sourcemap: isDebug ? "inline" : false,
rollupOptions: {
output: {
entryFileNames: "assets/[name].js",
chunkFileNames: "assets/[name].js",
assetFileNames: "assets/[name].[ext]",
},
},
},
resolve: {
alias: [{ find: "@", replacement: resolve(__dirname, "./src") }],
},
test: {
environment: "jsdom",
},
});