chore: Enable HMR for frontend code (#2024)
* chore: Enable HMR for frontend code closes #2021 * revert
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user