-
Notifications
You must be signed in to change notification settings - Fork 3
/
vue.config.js
executable file
·72 lines (71 loc) · 2.01 KB
/
vue.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// Created with
// https://github.com/adambullmer/vue-cli-plugin-browser-extension
module.exports = {
filenameHashing: false,
configureWebpack: {
devtool: "source-map",
},
pages: {
popup: {
template: "public/browser-extension.html",
entry: "./src/popup/main.ts",
title: "Track and Trace Tools Menu",
},
// options: {
// template: 'public/browser-extension.html',
// entry: './src/options/main.js',
// title: 'Options',
// },
// override: {
// template: 'public/browser-extension.html',
// entry: './src/override/main.js',
// title: 'Override',
// },
standalone: {
template: "public/browser-extension.html",
entry: "./src/options/main.ts",
title: "Track and Trace Tools",
filename: "index.html",
},
print: {
template: "public/browser-extension.html",
entry: "./src/print/main.ts",
title: "Track and Trace Tools",
filename: "print.html",
},
// devtools: {
// template: 'public/browser-extension.html',
// entry: './src/devtools/main.js',
// title: 'Devtools',
// },
},
pluginOptions: {
browserExtension: {
manifestTransformer: (manifest) => {
console.log(manifest.content_scripts);
if (process.env.NODE_ENV === "development") {
manifest.content_scripts[0].css.pop();
// manifest.content_scripts.pop();
} else {
manifest.content_scripts[0].css.push("css/content-script.css");
}
return manifest;
},
componentOptions: {
background: {
entry: "src/background.ts",
},
contentScripts: {
entries: {
"content-script": ["src/content-scripts/content-script.ts"],
"main-script": ["src/content-scripts/main-script.ts"],
"load-script": ["src/content-scripts/load-script.ts"],
// 'worker': [
// 'src/content-scripts/worker.ts',
// ],
},
},
},
},
},
};