-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.ts
More file actions
28 lines (26 loc) · 785 Bytes
/
vite.config.ts
File metadata and controls
28 lines (26 loc) · 785 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
import path from "path"
import tailwindcss from "@tailwindcss/vite"
import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react";
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
return {
// This is set in the deploy.yml workflow. Otherwise, no subpath.
base: env.VITE_GITHUB_REPO_NAME ? `/${env.VITE_GITHUB_REPO_NAME}/` : '',
plugins: [react(), tailwindcss()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
server: {
allowedHosts: ['polislike-human-cartography-prototype-v2.loca.lt'],
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./src/test-setup.ts'],
},
};
});