chore: Enable HMR for frontend code (#2024)

* chore: Enable HMR for frontend code
closes #2021

* revert
This commit is contained in:
Tom Moor
2021-04-11 15:09:00 -07:00
committed by GitHub
parent 2a6dfdea5d
commit cdc7f61fa1
7 changed files with 134 additions and 44 deletions

View File

@ -1,6 +1,7 @@
/* eslint-disable */
const webpack = require("webpack");
const commonWebpackConfig = require("./webpack.config");
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
const developmentWebpackConfig = Object.assign(commonWebpackConfig, {
cache: true,
@ -17,7 +18,12 @@ const developmentWebpackConfig = Object.assign(commonWebpackConfig, {
developmentWebpackConfig.plugins = [
...developmentWebpackConfig.plugins,
new webpack.HotModuleReplacementPlugin()
new webpack.HotModuleReplacementPlugin(),
new ReactRefreshWebpackPlugin({
overlay: {
sockIntegration: 'whm',
},
}),
];
module.exports = developmentWebpackConfig;