-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
38 lines (31 loc) · 934 Bytes
/
vite.config.js
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
//=vite.config.js
import react from "@vitejs/plugin-react"
import autoprefixer from "autoprefixer"
import tailwindcss from "tailwindcss"
import { fileURLToPath, URL } from "url"
import { defineConfig } from "vite"
const srcAlias = fileURLToPath(new URL("./src", import.meta.url))
const componentsAlias = fileURLToPath(new URL("./src/components", import.meta.url))
const assetsAlias = fileURLToPath(new URL("./src/assets", import.meta.url))
export default defineConfig({
plugins: [react()],
build: {
minify: "esbuild", // https://v4.vitejs.dev/config/build-options.html#build-minify
sourcemap: false, // https://v4.vitejs.dev/config/build-options.html#build-sourcemap
},
resolve: {
alias: {
"@": srcAlias,
"@components": componentsAlias,
"@assets": assetsAlias,
},
},
css: {
postcss: {
plugins: [tailwindcss, autoprefixer],
},
},
server: {
port: 3006,
},
})