【发布时间】:2023-02-02 10:47:18
【问题描述】:
我查看了文档,发现 webpack 4 有一个名为 profile 的命令。
当我执行 npx webpack --version 时,我看到:
webpack: 4.46.0
webpack-cli: 4.9.2
webpack-dev-server 4.7.4
当我执行 npx webpack --help 时,我在命令列表中看不到 profile:
Commands:
build|bundle|b [entries...] [options] Run webpack (default command, can be omitted).
configtest|t [config-path] Validate a webpack configuration.
help|h [command] [option] Display help for commands and options.
info|i [options] Outputs information about your system.
serve|server|s [entries...] [options] Run the webpack dev server.
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
watch|w [entries...] [options] Run webpack and watch for files changes.
还有 npx webpack help profile,我看到:
[webpack-cli] Can't find and load command 'profile'
[webpack-cli] Run 'webpack --help' to see available commands and options.
我想知道,如何访问 webpack 4 中的配置文件命令?它是在我使用的版本之后添加的吗?
【问题讨论】: