【问题标题】:symfony/encore: Hide warning of dependencysymfony/encore:隐藏依赖警告
【发布时间】:2020-05-18 06:51:09
【问题描述】:

我正在努力隐藏来自我无法修复的依赖项的警告。

我尝试过的事情:

  • 配置 webpack config stats 选项;但我后来看到 Encore 基本上已经禁用了警告输出(在查看 Encore.getWebpackConfig() 的输出时)。
  • 为 encore 使用的friendly-errors-plugin 编写一个转换器;将我不想看到的警告设置为null。然而,在转换之后,null 值没有被过滤掉,导致崩溃(有点道理,因为它们不是过滤器;但值得一试)

让我感到困惑的是,friendly-errors-webpack-plugin 显然是从 webpack 输出 see source 获取输入,但即使我用 stats: false 禁用所有警告,警告仍然会出现。

简而言之;如何隐藏此警告:

 WARNING  Compiled with 1 warnings                                                                                                                                                                                                                                                                                     8:44:25 AM

 warning  in ./node_modules/moment/locale/en-SG.js

There are multiple modules with names that only differ in casing.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Use equal casing. Compare these module identifiers:
* /home/famoser/Repos/mangelio/web/node_modules/moment/locale/en-SG.js
    Used by 2 module(s), i. e.
    /home/famoser/Repos/mangelio/web/node_modules/moment/locale sync /^\.\/.*$/
* /home/famoser/Repos/mangelio/web/node_modules/moment/locale/en-sg.js
    Used by 2 module(s), i. e.
    /home/famoser/Repos/mangelio/web/node_modules/moment/locale sync /^\.\/.*$/

【问题讨论】:

    标签: webpack-encore


    【解决方案1】:

    是的,删除文件夹 node_modules 和 yarn/npm install 解决了这个问题,谢谢!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-07-12
      • 2015-02-25
      • 2023-03-08
      • 2022-09-30
      • 1970-01-01
      • 1970-01-01
      • 2018-03-18
      • 1970-01-01
      相关资源
      最近更新 更多