Skip to content

Commit

Permalink
fix(@angular/cli): only adjust root relative stylesheet urls
Browse files Browse the repository at this point in the history
Close #5238
  • Loading branch information
Charles Lyding authored and filipesilva committed Mar 9, 2017
1 parent fcb1f35 commit 1e7d519
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@angular/cli/models/webpack-configs/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export function getStylesConfig(wco: WebpackConfigOptions) {
const deployUrl = wco.buildOptions.deployUrl;
const postcssUrlOptions = {
url: (URL: string) => {
// Only convert absolute URLs, which CSS-Loader won't process into require().
if (!URL.startsWith('/')) {
// Only convert root relative URLs, which CSS-Loader won't process into require().
if (!URL.startsWith('/') || URL.startsWith('//')) {
return URL;
}
// Join together base-href, deploy-url and the original URL.
Expand Down

0 comments on commit 1e7d519

Please sign in to comment.