-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathvite.config.firefox.ts
More file actions
33 lines (31 loc) · 991 Bytes
/
vite.config.firefox.ts
File metadata and controls
33 lines (31 loc) · 991 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
import { resolve } from "path";
import { mergeConfig, defineConfig } from "vite";
import { crx, ManifestV3Export } from "@crxjs/vite-plugin";
import baseConfig, { baseManifest, baseBuildOptions, bundleInPageScriptPlugin } from "./vite.config.base";
const outDir = resolve(__dirname, "dist_firefox");
export default mergeConfig(
baseConfig,
defineConfig({
base: "./",
plugins: [
crx({
manifest: {
...baseManifest,
background: {
scripts: ["src/pages/background/index.ts"],
},
} as ManifestV3Export,
browser: "firefox",
contentScripts: {
injectCss: true,
},
}),
bundleInPageScriptPlugin(outDir),
],
build: {
...baseBuildOptions,
outDir,
},
publicDir: resolve(__dirname, "public"),
}),
);