-
Notifications
You must be signed in to change notification settings - Fork 23
/
chrome.webpack.dev.config.js
47 lines (46 loc) · 1.45 KB
/
chrome.webpack.dev.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
const path = require("path");
const {DefinePlugin} = require("webpack");
const CircularDependencyPlugin = require('circular-dependency-plugin');
module.exports = {
mode: "development",
devtool: "cheap-module-source-map",
resolve: {
alias: {
Polyfill: path.resolve(__dirname, "src/polyfill.js")
},
modules: [path.resolve(__dirname, "src"), "node_modules"]
},
entry: {
"background/background": "./src/background/background.js",
"background/captureTab": "./src/background/captureTab.js",
"background/tmpClear": "./src/background/tmpClear.js",
"background/commands": "./src/background/commands.js",
"popup/popup": "./src/popup/popup.js",
"content/content": "./src/content/content.js",
"options/options": "./src/options/options.js"
},
output: {
filename: "[name].js",
path: path.resolve(__dirname, "dist")
},
plugins: [
new CircularDependencyPlugin({
exclude: /node_modules|cartographer\/pkg/,
failOnError: true,
allowAsyncCycles: false,
cwd: process.cwd()
}),
new DefinePlugin({
TARGET: "\"chrome\""
})
],
experiments: {
asyncWebAssembly: true,
// buildHttp: true,
// layers: true,
// lazyCompilation: true,
// outputModule: true,
// syncWebAssembly: true,
topLevelAwait: true,
},
};