【发布时间】: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