forked from stride-nyc/remote_retro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.dev.config.js
44 lines (41 loc) · 1.08 KB
/
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
const webpack = require("webpack")
const webpackMerge = require("webpack-merge")
const WebpackNotifierPlugin = require("webpack-notifier")
const sharedConfig = require("./webpack.shared.config.js")
const DEV_SERVER_PORT = 8080
const OUTPUT_PUBLIC_PATH = `http://localhost:${DEV_SERVER_PORT}/`
module.exports = webpackMerge.smart({
mode: "development",
devtool: "source-map",
entry: [
"react-hot-loader/patch",
`webpack-dev-server/client?${OUTPUT_PUBLIC_PATH}`,
"webpack/hot/only-dev-server",
],
output: {
publicPath: OUTPUT_PUBLIC_PATH,
hotUpdateChunkFilename: "hot/hot-update.js",
hotUpdateMainFilename: "hot/hot-update.json",
},
devServer: {
port: DEV_SERVER_PORT,
contentBase: sharedConfig.output.path,
publicPath: OUTPUT_PUBLIC_PATH,
},
module: {
rules: [
{
test: /\.css$/,
use: [
{
loader: "css-hot-loader",
},
],
},
],
},
plugins: [
new WebpackNotifierPlugin({ skipFirstNotification: true }),
new webpack.HotModuleReplacementPlugin(),
],
}, sharedConfig)