فهرست منبع

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
         ];