-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
46 lines (44 loc) · 1.15 KB
/
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
37
38
39
40
41
42
43
44
45
46
import { defineConfig } from "vite"
import react from "@vitejs/plugin-react-swc"
import { visualizer } from "rollup-plugin-visualizer"
import { viteStaticCopy } from "vite-plugin-static-copy"
import * as path from "path"
import { setDefaultResultOrder } from "dns"
setDefaultResultOrder("verbatim")
// https://vitejs.dev/config/
export default defineConfig({
server: {
host: "localhost",
open: true,
port: 3000,
strictPort: true,
},
plugins: [
react(),
visualizer({
gzipSize: true,
brotliSize: true,
open: false,
filename: "dist/stats.html",
}),
viteStaticCopy({
targets: [
{
src: "staticwebapp.config.json",
dest: "",
},
],
}),
],
resolve: {
alias: {
$components: path.resolve(__dirname, "./src/components"),
$queries: path.resolve(__dirname, "./src/queries"),
$lib: path.resolve(__dirname, "./src/lib"),
$hooks: path.resolve(__dirname, "./src/hooks"),
$types: path.resolve(__dirname, "./src/types"),
$store: path.resolve(__dirname, "./src/store"),
$assets: path.resolve(__dirname, "./src/assets"),
},
},
})