Webpack Dev Server (webpack-dev-server) Hot Module Replacement (HMR) Not Working

前端 未结 6 2800
执笔经年
执笔经年 2021-02-19 22:48

I have gone through many answers on StackOverflow & on GitHub issues as well but, I am still stuck in Hot Module Replacement in Webpack. I am using npm start to

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-19 23:08

    Try updating your module loader to this:

    loaders: [
          {
            test: /\.jsx$/,
            exclude: /node_modules/,
            loaders: ["react-hot", "babel"],
            query: {
              presets: ["es2015", "react"]
            }
          }
        ]
    

提交回复
热议问题