generated from myTerminal/template-chrome-extension-webpack
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.live.js
37 lines (34 loc) · 883 Bytes
/
webpack.live.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
/* global require module */
const outputDir = "public";
const webpack = require("webpack");
const WebpackMerge = require("webpack-merge");
const commonConfig = require("./webpack.common.js");
module.exports = WebpackMerge(commonConfig, {
devtool: "inline-source-map",
plugins: [new webpack.NamedModulesPlugin(), new webpack.NoEmitOnErrorsPlugin()],
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
}
}
]
}
]
},
devServer: {
contentBase: `./${outputDir}`,
port: 9000,
inline: true,
stats: "errors-only"
}
});