-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
36 lines (32 loc) · 945 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
import { defineConfig } from "vite"
import react from "@vitejs/plugin-react-swc"
// https://vitejs.dev/config/
export default defineConfig({
server: {
host: true,
port: 5150,
strictPort: true,
https: false,
open: true,
},
// build: {
// rollupOptions: {
// output: {
// chunkFileNames: "assets/js/[name]-[hash].js",
// entryFileNames: "assets/js/[name]-[hash].js",
// assetFileNames: ({ name }) => {
// if (/\.(gif|jpe?g|png|svg)$/.test(name ?? "")) {
// return "assets/images/[name]-[hash][extname]"
// }
// if (/\.css$/.test(name ?? "")) {
// return "assets/css/[name]-[hash][extname]"
// }
// // default value
// // ref: https://rollupjs.org/guide/en/#outputassetfilenames
// return "assets/[name]-[hash][extname]"
// },
// },
// },
// },
plugins: [react()],
})