forked from masx200/Pi-calculation-multithreading
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
32 lines (32 loc) · 1002 Bytes
/
vite.config.js
File metadata and controls
32 lines (32 loc) · 1002 Bytes
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
import path, { resolve } from "path";
import { defineConfig } from "vite";
import { createHtmlPlugin } from "vite-plugin-html";
import checker from "vite-plugin-checker";
import { VitePWA } from "vite-plugin-pwa";
export default defineConfig({
esbuild: { drop: ["console", "debugger"] },
plugins: [
VitePWA({
registerType: "autoUpdate",
workbox: { globPatterns: ["*/*"] },
}),
createHtmlPlugin({
minify: {
removeAttributeQuotes: false,
removeComments: true,
removeTagWhitespace: true,
collapseWhitespace: true,
},
}),
checker({ typescript: { root: path.resolve(__dirname) } }),
],
root: resolve(__dirname, "src"),
build: {
minify: "terser",
target: "es2015",
terserOptions: {
format: { comments: false },
compress: { drop_console: true, drop_debugger: true },
},
},
});