-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
44 lines (42 loc) · 939 Bytes
/
Copy pathvite.config.ts
File metadata and controls
44 lines (42 loc) · 939 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
33
34
35
36
37
38
39
40
41
42
43
44
import { crx } from "@crxjs/vite-plugin";
import tailwindcss from "@tailwindcss/vite";
import { defineConfig } from "vite";
import zip from "vite-plugin-zip-pack";
import manifestConfig from "./extension/manifest.config";
export default defineConfig(async () => ({
root: "./extension/",
build: {
outDir: "../dist/extension",
emitAssets: true,
copyPublicDir: false,
cssCodeSplit: false,
rollupOptions: {
input: {
main: "./extension/index.html",
options: "./extension/options.html",
widgets: "./extension/widgets.html",
},
},
},
plugins: [
tailwindcss(),
// viteStaticCopy({
// targets: [
// {
// src: './extension/*.html',
// dest: '.',
// },
// ],
// }),
zip({
outDir: "./dist",
outFileName: "extension.zip",
}),
crx({ manifest: manifestConfig }),
],
server: {
cors: {
origin: [/chrome-extension:\/\//],
},
},
}));