-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.ts
53 lines (51 loc) · 1.18 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
47
48
49
50
51
52
53
import { defineConfig } from "vite"
import path from "node:path"
import react from "@vitejs/plugin-react"
import { viteStaticCopy } from "vite-plugin-static-copy"
import url from "node:url"
const dirname = path.dirname(url.fileURLToPath(import.meta.url))
export default defineConfig({
resolve: {
alias: {
"@": path.resolve(dirname, "src"),
},
},
plugins: [
react(),
viteStaticCopy({
targets: [
{
src: "src/extension/manifest.json",
dest: ".",
},
{
src: "public/*.png",
dest: ".",
},
],
}),
],
build: {
target: "esnext",
emptyOutDir: true,
minify: false,
modulePreload: {
polyfill: false,
resolveDependencies: () => [],
},
rollupOptions: {
strictDeprecations: true,
preserveEntrySignatures: "strict",
input: [path.resolve(dirname, "src/extension/popup.html")],
output: {
minifyInternalExports: false,
inlineDynamicImports: false,
validate: true,
entryFileNames: `[name].js`,
assetFileNames: `[name].[ext]`,
chunkFileNames: `[name].js`,
esModule: true,
},
},
},
})