Hide IE warnings from console in Angular 6

冷暖自知 提交于 2021-01-27 06:06:16

问题


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

e.g.:

./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

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


回答1:


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

/* autoprefixer: off */

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;
}

Source: https://github.com/angular/angular-cli/issues/5964



来源:https://stackoverflow.com/questions/51544729/hide-ie-warnings-from-console-in-angular-6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!