From 937f56bb7e726b1fc3530b84ac5784565bca35e1 Mon Sep 17 00:00:00 2001 From: Liuqing650 <1006822621@qq.com> Date: Mon, 21 May 2018 14:55:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=88=86=E6=94=AF---antd-dva?= =?UTF-8?q?=E4=B8=AD=E4=BF=AE=E5=A4=8D=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 +++- package.json | 4 ++-- webpack.config.js | 7 ++++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 02032d6..12928fd 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,9 @@ - 8. 添加新分支`antd-dva`,配置 `webpack` + `dva` - 9. 添加 `axios` - 10. 添加 `mockjs` - + - 11. 修复错误日志不显示在屏幕的问题 + - 12. 调整开发模式的控制台日志显示,关闭 `modules: false` + - 13. 调整构建模块信息.展示运行进度 `--progress` ## 多线程打包测试结果 |状态|是否开启多线程|首次运行(ms)|再次运行(ms)|三次运行(ms)|四次(ms)|五次运行(ms)| diff --git a/package.json b/package.json index 6e5bd54..c79be74 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ }, "betterScripts": { "start": { - "command": "webpack-dev-server --open --config webpack.config.js", + "command": "webpack-dev-server --progress --open --config webpack.config.js", "env": { "NODE_PATH": "./src", "NODE_ENV": "development", @@ -20,7 +20,7 @@ } }, "build": { - "command": "webpack --config webpack.config.js", + "command": "webpack --progress --config webpack.config.js", "env": { "NODE_PATH": "./src", "NODE_ENV": "production", diff --git a/webpack.config.js b/webpack.config.js index e289c00..129979b 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -13,7 +13,7 @@ const nodeEnv = process.env.NODE_ENV || 'development'; const isDev = nodeEnv !== 'production'; const ASSET_PATH = process.env.ASSET_PATH || '/'; -const isHappy = true; // 开启多线程打包 +const isHappy = !isDev; // 开启多线程打包 const eslint = true; const stylelint = false; @@ -196,6 +196,11 @@ module.exports = { historyApiFallback: true, headers: { 'maby': 'demo' + }, + overlay: true, + stats: { + color: true, + modules: false } }, plugins: getPlugins(),