gpt4 book ai didi

javascript - Karma-webpack 插件显示大量信息

转载 作者:行者123 更新时间:2023-12-03 04:44:50 24 4
gpt4 key购买 nike

Karma-webpackwebpack 添加到我的 karma-jasmine 环境中后,我获得了很多新信息。如:

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
}

我的问题,显示的所有信息是什么?压制此信息有什么缺点吗?

最佳答案

您可以看到stats查看这些信息的含义。您还可以配置 webpackMiddleware.stats 让 webpack 只显示您想要的信息。

就像:

webpackMiddleware: {
stats: 'minimal'
}

关于javascript - Karma-webpack 插件显示大量信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42915897/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com