1 child 编译中的警告(使用 'stats.children: true' resp. '--stats-children' 了解更多详情)

1 WARNING in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)

创建 laravel 项目时如何解决此警告?

1 WARNING in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)

复制步骤:

  1. 作曲家 create-project --prefer-dist laravel/laravel 例子
  2. cd 示例
  3. 作曲家要求uire laravel/ui
  4. php artisan ui vue --auth
  5. npm install vue@next vue-router@next vue-loader@next
  6. npm 安装
  7. npm 运行 开发

编辑

来自 this solution,将这些行添加到 webpack.mix.js

mix.webpackConfig({
    stats: {
        children: true,
    },
});

上述解决方案产生了另一个警告:

WARNING in ./resources/sass/app.scss (./node_modules/css-loader/dist/cjs.js??clonedRuleSet-6.use1!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-6.use[2]!./node_modules/resolve-url-loader/index.js??clonedRuleSet-6.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-6.use[4]!./resources/sass/app.scss) Module Warning (from ./node_modules/postcss-loader/dist/cjs.js): Warning

(2423:3) autoprefixer: Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.

Child mini-css-extract-plugin C:\xampp\htdocs\lva\node_modules\css-loader\dist\cjs.js??clonedRuleSet-6.use1!C:\xampp\htdocs\lva\node_modules\postcss-loader\dist\cjs.js??clonedRuleSet-6.use[2]!C:\xampp\htdocs\lva\node_modules\resolve-url-loader\index.js??clonedRuleSet-6.use[3]!C:\xampp\htdocs\lva\node_modules\sass-loader\dist\cjs.js??clonedRuleSet-6.use[4]!C:\xampp\htdocs\lva\resources\sass\app.scss compiled with 1 warning webpack compiled with 1 warning

我该如何解决这个问题?

您可能更新了您的 npm 包。我能够通过在 package-lock.json.

中将 autoprefixer 包恢复到版本 10.4.5 来解决这个问题

color-adjust shorthand 目前已弃用,它依赖于 autoprefixer@10.4.6 (source)。

我能够通过将 autoprefixer 包和@Benno 恢复到版本 10.4.5 来解决这个问题。 运行 这个:

npm install autoprefixer@10.4.5 --save-exact

当你遇到自动前缀问题时,你可以添加基于问题的版本自动前缀autoprefixer。我在“print-color-adjust”上遇到问题,我在 package.json

上添加了代码

当你使用 npm 时

    "overrides": {
      "autoprefixer": "10.4.5"
     },

或者,当你使用纱线时

    "resolutions": {
      "autoprefixer": "10.4.5"
    },

不要忘记删除您的 package-lock 和 node_modules ,然后重新安装 npm。 它对我有用 (react-bootstrap.v.5)