【问题标题】:Webpack 4 profile command missing? How can I get access to it with webpack 4?缺少 Webpack 4 配置文件命令?我如何使用 webpack 4 访问它?
【发布时间】: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 中的配置文件命令?它是在我使用的版本之后添加的吗?

【问题讨论】:

    标签: webpack webpack-4


    【解决方案1】:

    我的理解是 --profile 是一个标志,而不是命令

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-08-09
      • 2018-10-22
      • 2019-01-18
      • 2018-10-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多