在与webpack一起构建代码时,我遇到了下面提到的日志
[../node_modules/lodash/lodash.js] 504 KiB {main} [built]
harmony import specifier lodash [./client.js] 82:13-14
harmony import specifier lodash [./selectors/buyInsuranceSelectors.js] 49:42-43
harmony import specifier lodash [./client.js] 84:7-8
harmony import specifier lodash [./client.js] 86:6-7
harmony import specifier lodash [./client.js] 88:6-7
harmony import specifier lodash [./client.js] 97:27-28
harmony import specifier lodash [./client.js] 99:16-17
harmony import specifier lodash [./client.js] 129:19-20
harmony import specifier lodash [./client.js] 164:29-30
harmony side effect evaluation lodash [./store/configureStore.js] 5:0-23
harmony import specifier lodash [./store/configureStore.js] 12:23-24
harmony import specifier lodash [./store/configureStore.js] 51:14-15
harmony side effect evaluation lodash [./selectors/userInfoSelector.js] 8:0-23
harmony import specifier lodash [./selectors/userInfoSelector.js] 10:25-26
harmony import specifier lodash [./selectors/userInfoSelector.js] 12:9-10
harmony side effect evaluation lodash [./services/GTMUtil.js] 8:0-23
harmony import specifier lodash [./services/GTMUtil.js] 363:27-28
harmony import specifier lodash [./services/GTMUtil.js] 440:15-16
harmony import specifier lodash [./services/GTMUtil.js] 452:15-16
harmony import specifier lodash [./services/GTMUtil.js] 460:15-16有没有办法删除这些日志,例如"harmony side effect evaluation lodash./services/GTMUtil.js 8:0-23“,因为它们太多了,终端输出变得太拥挤了?
发布于 2018-11-28 07:10:09
要删除这些日志,您可以在您的webpack配置中添加一个统计数据对象。在该对象中,您必须将modules属性设置为false。
所以在你的webpack.config.js中应该是这样的
stats: {
modules: false
}一旦你这样做,这些将被删除。如果您想了解更多信息,请访问以下所有统计数据:https://webpack.js.org/configuration/stats/
https://stackoverflow.com/questions/51154356
复制相似问题