1. Add the hot:true setting to devServer. Only adding this setting will refresh the browser

2. Install the react-hot-loader plug-in

3. Install @babel/plugin-proposal-decorators plugin to add configuration

Syntax error – Support for the experimental Syntax ‘decorators-legacy’ isn’t currently enabled

Import {hot} from ‘react-hot-loader’ and @hot(module)

Adding the above four steps enables partial refresh of js pages

The following is a partial update of the CSS implementation

Since you are using the MiniCssExtractPlugin, add the configuration shown below, but install the cross-env plug-in to differentiate the environment

If this article is helpful to you, please remember to like it