-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.debug.js
More file actions
61 lines (60 loc) · 1.29 KB
/
vite.config.debug.js
File metadata and controls
61 lines (60 loc) · 1.29 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
50
51
52
53
54
55
56
57
58
59
60
61
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import path from "path";
import ViteRequireContext from "@originjs/vite-plugin-require-context";
import tailwindcss from "@tailwindcss/vite";
// https://vitejs.dev/config/
export default defineConfig({
//base: "/",
mode: "development",
server: {
open: "/",
},
build: {
brotliSize: false,
manifest: false,
sourcemap: false, //'inline'
minify: "terser",
publicDir: "public/",
outDir: "dist/",
rollupOptions: {
external: [
"**/*.mp4",
"**/*.ogv",
"**/*.ogg",
"**/*.webm",
"**/*.gltf",
"**/*.glb",
"**/*.drc",
"**/*.ktx2",
"**/*.bin",
],
output: {
assetFileNames: "src/assets/[ext]/[name][extname]",
chunkFileNames: "src/assets/js/[name].[hash].js",
entryFileNames: "src/assets/js/[name].js",
manualChunks: (id) => {
if (id.includes("node_modules"))
return id
.toString()
.split("node_modules/")[1]
.split("/")[0]
.toString();
},
},
},
},
resolve: {
extensions: [".mjs", ".js", ".ts", ".jsx", ".tsx", ".json", ".vue"],
alias: [
{
find: "@",
replacement: path.resolve(__dirname, "src"),
},
],
},
optimizeDeps: {
exclude: ["worker"],
},
plugins: [ViteRequireContext, vue(), tailwindcss()],
});