generated from myTerminal/template-chrome-extension-webpack
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.dev.js
41 lines (39 loc) · 1.13 KB
/
webpack.dev.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
/* global require module */
const webpack = require("webpack");
const WebpackMerge = require("webpack-merge");
const commonConfig = require("./webpack.common.js");
const ChromeExtensionReloader = require("webpack-chrome-extension-reloader");
module.exports = WebpackMerge(commonConfig, {
devtool: "inline-source-map",
plugins: [
new webpack.NamedModulesPlugin(),
new webpack.NoEmitOnErrorsPlugin(),
new ChromeExtensionReloader({
reloadPage: true, // Force the reload of the page also
entries: {
// The entries used for the content/background scripts
contentScript: "content-script", // Use the entry names, not the file name or the path
background: "background" // *REQUIRED
}
})
],
module: {
rules: [
{
test: /\.elm$/,
exclude: [/elm-stuff/, /node_modules/],
use: [
{ loader: "elm-hot-webpack-loader" },
{
loader: "elm-webpack-loader",
options: {
// add Elm's debug overlay to output
debug: false,
forceWatch: true
}
}
]
}
]
}
});