Angular2 cli:基于环境

时间:2016-11-04 13:13:28

标签: angularjs angular angular-cli

我正在使用angular cli构建项目,如何根据环境操作css / scss文件中的url?即我可以在开发中使用这样的东西:

 background-image: url(url1/foo.png);
 @font-face { font-family: foo;
    src: url(url1/foo.woff);
}

并通过运行'ng build --prod'将其转换为以下内容:

 background-image: url(produrl/foo.png);
 @font-face { font-family: foo;
    src: url(produrl/foo.woff);
}

0 个答案:

没有答案
相关问题