forked from outline/outline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.dev.js
33 lines (29 loc) · 815 Bytes
/
webpack.config.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
/* eslint-disable */
const webpack = require("webpack");
const commonWebpackConfig = require("./webpack.config");
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
const isTest = process.env.NODE_ENV === "test";
const developmentWebpackConfig = Object.assign(commonWebpackConfig, {
cache: true,
mode: "development",
devtool: "eval-cheap-module-source-map",
entry: [
"webpack-hot-middleware/client",
"./app/index",
],
optimization: {
usedExports: true,
},
});
if (!isTest) {
developmentWebpackConfig.plugins = [
...developmentWebpackConfig.plugins,
new webpack.HotModuleReplacementPlugin(),
new ReactRefreshWebpackPlugin({
overlay: {
sockIntegration: 'whm',
},
}),
];
}
module.exports = developmentWebpackConfig;