-
-
Notifications
You must be signed in to change notification settings - Fork 29
/
vite.config.ts
36 lines (32 loc) · 957 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
34
35
36
/* eslint-disable import/no-extraneous-dependencies */
/// <reference types="vitest" />
import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react";
// // https://vitejs.dev/config/
// export default defineConfig({
// plugins: [react()],
// });
// https://vitejs.dev/config/
export default ({ mode }: { mode: string }) => {
process.env = { ...process.env, ...loadEnv(mode, process.cwd()) };
return defineConfig({
base: "/vite-react-tailwind-bionic-reading/",
plugins: [react()],
test: {
// Do not process css files (is slow)
css: false,
environment: 'jsdom',
// This is to not import test, it, expect, vi (instead of jest). Similar to how jest works
globals: true,
setupFiles: ["./src/setupTests.ts"],
},
server: {
watch: {
usePolling: true,
},
host: true,
strictPort: true,
port: +process.env?.PORT || 3000,
},
});
};