This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
outline/webpack.config.dev.js

34 lines
815 B
JavaScript
Raw Normal View History

2017-05-17 07:09:47 +00:00
/* eslint-disable */
const webpack = require("webpack");
const commonWebpackConfig = require("./webpack.config");
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
2016-02-27 21:53:11 +00:00
2021-04-22 00:53:53 +00:00
const isTest = process.env.NODE_ENV === "test";
2016-04-29 05:25:37 +00:00
const developmentWebpackConfig = Object.assign(commonWebpackConfig, {
2016-02-27 21:53:11 +00:00
cache: true,
mode: "development",
2021-04-23 01:59:59 +00:00
devtool: "eval-cheap-module-source-map",
2016-02-27 21:53:11 +00:00
entry: [
"webpack-hot-middleware/client",
"./app/index",
2016-02-27 21:53:11 +00:00
],
optimization: {
usedExports: true,
},
2016-02-27 21:53:11 +00:00
});
2021-04-22 00:53:53 +00:00
if (!isTest) {
developmentWebpackConfig.plugins = [
...developmentWebpackConfig.plugins,
new webpack.HotModuleReplacementPlugin(),
new ReactRefreshWebpackPlugin({
overlay: {
sockIntegration: 'whm',
},
}),
];
}
2016-02-27 21:53:11 +00:00
module.exports = developmentWebpackConfig;