瀏覽代碼

Added missing hot module replacement plugin and entry points

Fela Maslen 7 年之前
父節點
當前提交
a191c07761
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      webpack.config.js

+ 3 - 0
webpack.config.js

@@ -53,6 +53,7 @@ function getPlugins() {
     if (__DEV__) {
         return [
             ...common,
+            new webpack.HotModuleReplacementPlugin(),
             new Dotenv()
         ];
     }
@@ -71,6 +72,8 @@ function getEntry() {
 
     if (__DEV__) {
         return [
+            'webpack/hot/only-dev-server',
+            'webpack-hot-middleware/client?reload=true',
             'react-hot-loader/patch',
             ...common
         ];