在 Angular 6 的控制台中隐藏 IE 警告 [英] Hide IE warnings from console in Angular 6

查看:24
本文介绍了在 Angular 6 的控制台中隐藏 IE 警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在为我的 Angular 应用提供服务时,我不断收到这些警告:

I am constantly getting these warnings when serving my angular app:

例如:

./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 支持不感兴趣.是否可以禁用此类警告?

Unfortunately, I am not interested in IE support. Is it possible to disable this type of warnings?

推荐答案

您可以通过在行前添加以下内容来禁用 CSS 文件中单行的警告:

You can disable warnings for single lines in your CSS file by prepending the line with:

/* autoprefixer: off */

例如,IE 不支持 CSS 设置 grid-auto-rows.要禁用警告,请按如下方式应用:

For example, IE does not support the CSS setting grid-auto-rows. To disable the warning, apply it like this:

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

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

这篇关于在 Angular 6 的控制台中隐藏 IE 警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆