[英]Angular 2 - Is it possible to add absolute path to e.g. styles.78f022854070df211b2d.css?
does anybody know if its possible to add the absolute path / domain name to the href for stylesxxxxxx.css in Angular Universal? 有没有人知道是否可以将绝对路径/域名添加到Angular Universal中的stylesxxxxxx.css的href?
I have: link rel="stylesheet" href="styles.78f022854070df211b2d.css" 我有:link rel =“stylesheet”href =“styles.78f022854070df211b2d.css”
I want: link rel="stylesheet" href="https://www.domainname.com/styles.78f022854070df211b2d.css" 我想:link rel =“stylesheet”href =“https://www.domainname.com/styles.78f022854070df211b2d.css”
thanks in advance 提前致谢
您可以在构建时使用--deploy-url
选项,但这也会影响js文件的路径。
ng build --prod --deploy-url https://www.domainname.com
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.