Skip to content

Commit aaca7d8

Browse files
clydinBrocco
authored andcommitted
fix(@angular/cli): correct CSS resource resolving
1 parent 0ccdd1e commit aaca7d8

File tree

1 file changed

+5
-1
lines changed
  • packages/@angular/cli/models/webpack-configs

1 file changed

+5
-1
lines changed

Diff for: packages/@angular/cli/models/webpack-configs/styles.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ export function getStylesConfig(wco: WebpackConfigOptions) {
5555
postcssImports({
5656
resolve: (url: string, context: string) => {
5757
return new Promise<string>((resolve, reject) => {
58+
if (url && url.startsWith('~')) {
59+
url = url.substr(1);
60+
}
5861
loader.resolve(context, url, (err: Error, result: string) => {
5962
if (err) {
6063
reject(err);
@@ -110,7 +113,8 @@ export function getStylesConfig(wco: WebpackConfigOptions) {
110113
filter: (asset: PostcssUrlAsset) => !asset.hash && !asset.absolutePath.endsWith('.cur'),
111114
url: 'inline',
112115
// NOTE: maxSize is in KB
113-
maxSize: 10
116+
maxSize: 10,
117+
fallback: 'rebase',
114118
}
115119
]),
116120
autoprefixer(),

0 commit comments

Comments
 (0)