-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.js
More file actions
30 lines (30 loc) · 789 Bytes
/
Copy pathvite.config.js
File metadata and controls
30 lines (30 loc) · 789 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
const isProduction = process.env.NODE_ENV === "production";
export default {
build: {
sourcemap: !isProduction,
outDir: "build",
rollupOptions: {
input: {
action_button: "./src/views/action_button/index.html",
background: "./src/background.ts",
},
output: {
entryFileNames: (chunkInfo) => {
if (chunkInfo.name === "background") {
// The background-page is referenced in the manifest.json and
// therefore needs a stable filename
return "background.js";
}
return "[name].[hash].js";
},
},
},
},
test: {
include: ["test/unit/**/*.test.ts"],
coverage: {
provider: "istanbul", // or 'c8'
include: ["src/**/*.ts"],
},
},
};