-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.mjs
More file actions
49 lines (48 loc) · 1.15 KB
/
vite.config.mjs
File metadata and controls
49 lines (48 loc) · 1.15 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
47
48
49
/* eslint-disable */
import path from "path"
import { defineConfig } from "vite"
import react from "@vitejs/plugin-react"
export default defineConfig(({ command, mode, ssrBuild }) => {
return {
base: "/arbor/",
build: {
outDir: "./dist",
emptyOutDir: true,
minify: "esbuild",
manifest: true,
sourcemap: true,
},
resolve: {
alias: {
"~bootstrap": path.resolve(__dirname, "node_modules/bootstrap"),
},
},
server: {
origin: "http://localhost",
port: 5173,
// needed for vite and Cypress to work together
// see https://stackoverflow.com/questions/72324704/cypress-cant-load-assets-from-vites-devserver
host: "127.0.0.1",
strictPort: true,
hot: true,
hmr: {
port: 5174,
host: "127.0.0.1",
},
// redirects API calls to XAMPP server in development environment
proxy: {
"/api": {
target: "http://localhost/arbor",
changeOrigin: true,
secure: false,
},
},
},
preview: {
port: 5173,
strictPort: true,
},
open: true,
plugins: [react()],
}
})