forked from eclipse-editdor/editdor
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.js
More file actions
29 lines (29 loc) · 720 Bytes
/
vite.config.js
File metadata and controls
29 lines (29 loc) · 720 Bytes
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
import { defineConfig, loadEnv } from "vite";
import tailwindcss from "tailwindcss";
import react from "@vitejs/plugin-react";
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "");
return {
plugins: [react()],
css: {
postcss: {
plugins: [tailwindcss()],
},
},
base: "",
define: {
"process.env": env,
APP_VERSION: JSON.stringify(process.env.npm_package_version),
},
build: {
sourcemap: mode === "development",
},
test: {
globals: true,
environment: "jsdom",
setupFiles: "./src/setupTests.ts",
include: ["src/**/*.{test,spec}.{ts,tsx}"],
},
};
});