forked from hanghae-plus/front_6th_chapter1-2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
46 lines (43 loc) · 1.04 KB
/
vite.config.js
File metadata and controls
46 lines (43 loc) · 1.04 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
import { defineConfig as defineTestConfig, mergeConfig } from "vitest/config";
import { defineConfig } from "vite";
import { resolve } from "path";
const base = process.env.NODE_ENV === "production" ? "/front_6th_chapter1-2/" : "/";
export default mergeConfig(
defineConfig({
esbuild: {
jsx: "transform",
jsxFactory: "createVNode",
jsxDev: false,
},
optimizeDeps: {
esbuildOptions: {
jsx: "transform",
jsxFactory: "createVNode",
jsxDev: false,
},
},
base,
build: {
outDir: "dist",
assetsDir: "assets",
sourcemap: false,
rollupOptions: {
output: {
manualChunks: undefined,
},
input: {
main: resolve(__dirname, "index.html"),
404: resolve(__dirname, "404.html"),
},
},
},
}),
defineTestConfig({
test: {
globals: true,
environment: "jsdom",
setupFiles: "./src/setupTests.js",
exclude: ["**/e2e/**", "**/*.e2e.spec.js", "**/node_modules/**"],
},
}),
);