【问题标题】:Hide IE warnings from console in Angular 6在 Angular 6 中从控制台隐藏 IE 警告
【发布时间】:2019-01-03 19:08:46
【问题描述】:

在为我的 Angular 应用程序提供服务时,我经常收到这些警告:

例如:

./src/app/core/containers/navbar/navbar.component.sass
(Emitted value instead of an instance of Error) autoprefixer: ...src\app\core\containers\navbar\navbar.component.sass:11:4: grid-auto-columns is not supported by IE

很遗憾,我对 IE 支持不感兴趣。 是否可以禁用此类警告?

【问题讨论】:

  • 不幸!?!?我想你的意思是幸运!支持 IE 是所有前端开发者的瘟疫!
  • 是的,你是 100% 正确的 :D 但是你有解决方案吗?

标签: angular internet-explorer sass angular-cli angular6


【解决方案1】:

您可以禁用 CSS 文件中单行的警告,方法是在行前添加:

/* autoprefixer: off */

例如,IE 不支持 CSS 设置 grid-auto-rows。要禁用警告,请像这样应用它:

.some-div {
    display: grid;
    /* autoprefixer: off */
    grid-auto-rows: auto auto;
}

来源:https://github.com/angular/angular-cli/issues/5964

【讨论】:

  • 非常感谢!
猜你喜欢
  • 1970-01-01
  • 2014-02-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-07-17
  • 2019-08-17
  • 1970-01-01
  • 2016-03-03
相关资源
最近更新 更多