将Karma-webpack
和webpack
添加到我的业力 - 茉莉花环境中后,我获得了很多新信息。如:
webpack: Compiling...
Hash: ab5614b7ed14037096b5
Version: webpack 1.14.0
Time: 42ms
Asset Size Chunks Chunk Names
test-context.js 260 kB 0 test-context.js
chunk {0} test-context.js (test-context.js) 233 kB
[0] ./test/test-context.js 120 bytes {0}
[1] ./~/babel-polyfill/lib/index.js 833 bytes {0}
[2] ./~/babel-polyfill/~/core-js/shim.js 7.38 kB {0}
[3] ./~/babel-polyfill/~/core-js/modules/es6.symbol.js 8.93 kB {0}
[4] ./~/babel-polyfill/~/core-js/modules/_global.js 322 bytes {0}
[5] ./~/babel-polyfill/~/core-js/modules/_has.js 117 bytes {0}
[6] ./~/babel-polyfill/~/core-js/modules/_descriptors.js 177 bytes {0}
[7] ./~/babel-polyfill/~/core-js/modules/_fails.js 99 bytes {0}
[8] ./~/babel-polyfill/~/core-js/modules/_export.js 1.6 kB {0}
[9] ./~/babel-polyfill/~/core-js/modules/_core.js 117 bytes {0}
[10] ./~/babel-polyfill/~/core-js/modules/_hide.js 288 bytes {0}
...
[290] ./~/babel-polyfill/~/core-js/modules/_path.js 38 bytes {0}
[291] ./~/babel-polyfill/~/core-js/modules/web.immediate.js 164 bytes {0}
[292] ./~/babel-polyfill/~/core-js/modules/web.dom.iterable.js 881 bytes {0}
[293] ./~/regenerator-runtime/runtime.js 23.8 kB {0}
[294] ./~/process/browser.js 5.3 kB {0}
[295] ./~/babel-polyfill/~/core-js/fn/regexp/escape.js 107 bytes {0}
[296] ./~/babel-polyfill/~/core-js/modules/core.regexp.escape.js 232 bytes {0}
[297] ./~/babel-polyfill/~/core-js/modules/_replacer.js 227 bytes {0}
[298] ./test -spec\.js$ 160 bytes {0} [built]
有些看起来只是编译我的脚本(text-context.js
),但我不确定其余部分。
我发现将以下内容添加到karma.config.js
会取消所有这些信息。
webpackMiddleware: {
noInfo: true
}
我的问题是,所显示的所有信息是什么?是否有任何缺点来压制这些信息。
答案 0 :(得分:1)
您可以看到stats以查看信息的含义。您还可以配置webpackMiddleware.stats,让webpack只显示您想要的信息。
就像:
webpackMiddleware: {
stats: 'minimal'
}