gpt4 book ai didi

Webpack-dev-server 忽略 node_modules

转载 作者:行者123 更新时间:2023-12-02 04:38:47 35 4
gpt4 key购买 nike

当像这样运行 webpack-dev-server 时:

webpack-dev-server --config ./webpack.config.dev.js

终端会像这样控制台,很多控制台。如何忽略 node_modules?

bundle.js  4.11 MB       0  [emitted]  main
chunk {0} bundle.js (main) 1.43 MB [rendered]
[0] multi main 64 bytes {0} [built]
[1] ./~/babel-polyfill/lib/index.js 907 bytes {0} [built]
[2] ./~/core-js/shim.js 7.38 kB {0} [built]
[3] ./~/core-js/modules/es6.symbol.js 8.93 kB {0} [built]
...
[18] ./~/core-js/modules/_redefine.js 1.05 kB {0} [built]
[19] ./~/core-js/modules/_uid.js 158 bytes {0} [built]
[20] ./~/core-js/modules/_ctx.js 505 bytes {0} [built]
[21] ./~/core-js/modules/_a-function.js 120 bytes {0} [built]
...
[648] ./~/ansi-regex/index.js 135 bytes {0} [built]
[649] (webpack)/hot/only-dev-server.js 2.25 kB {0} [built]
[650] (webpack)/hot/log-apply-result.js 813 bytes {0} [built]

最佳答案

我修好了。在我的 webpack.config.dev.js 中添加这样的配置:

devServer: {
stats: {
chunks: false
},
},

关于Webpack-dev-server 忽略 node_modules,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39262675/

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