浏览代码

chore: Add hmr (#15221)

Simona 6 年之前
父节点
当前提交
865229e457
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      build/webpack.demo.js

+ 3 - 1
build/webpack.demo.js

@@ -33,7 +33,8 @@ const webpackConfig = {
   devServer: {
     host: '0.0.0.0',
     port: 8085,
-    publicPath: '/'
+    publicPath: '/',
+    hot: true
   },
   performance: {
     hints: false
@@ -100,6 +101,7 @@ const webpackConfig = {
     ]
   },
   plugins: [
+    new webpack.HotModuleReplacementPlugin(),
     new HtmlWebpackPlugin({
       template: './examples/index.tpl',
       filename: './index.html',