我有一个基于最新版本8.2.9的角度项目。在使用ng serve
的测试环境中,Google字体可以完美运行。但是,当我在生产服务器上发布项目时,不会加载字体。
style.scss
@import url('https://fonts.googleapis.com/css?family=Nunito:200,600');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');
但是,当我将上述字体加载语句从全局样式style.scss
移到app.component.scss
时。工作正常!它为何无法采用全球风格?我在这里ng build/serve --prod ignores scss url imports
答案 0 :(得分:0)