-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathvite.config.js
41 lines (40 loc) · 1.2 KB
/
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
39
40
41
import { defineConfig, normalizePath } from "vite";
import { viteStaticCopy } from 'vite-plugin-static-copy';
import path from "node:path";
import inject from "@rollup/plugin-inject";
export default defineConfig({
root: "./src",
plugins: [
viteStaticCopy({
targets: [
{
src: normalizePath(path.resolve(__dirname, './src/manifest.json')),
dest: normalizePath(path.resolve(__dirname, './build')),
},
{
src: normalizePath(path.resolve(__dirname, './src/icons')),
dest: normalizePath(path.resolve(__dirname, './build')),
},
]
}),
inject({
$: 'jquery',
jQuery: 'jquery',
}),
],
build: {
outDir: "build",
rollupOptions: {
// https://rollupjs.org/configuration-options/
input: [
"./src/popup/RegexSearch.html",
"./src/options/options.html",
],
output:{
format: "es",
dir: "build",
entryFileNames: "[name].js",
}
},
},
});