Skip to content

Commit 90abbd7

Browse files
clydinBrocco
authored andcommitted
fix(@angular/cli): correct CSS resource resolving
1 parent 4c6b42b commit 90abbd7

File tree

1 file changed

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

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ export function getStylesConfig(wco: WebpackConfigOptions) {
6767
postcssImports({
6868
resolve: (url: string, context: string) => {
6969
return new Promise<string>((resolve, reject) => {
70+
if (url && url.startsWith('~')) {
71+
url = url.substr(1);
72+
}
7073
loader.resolve(context, url, (err: Error, result: string) => {
7174
if (err) {
7275
reject(err);
@@ -122,7 +125,8 @@ export function getStylesConfig(wco: WebpackConfigOptions) {
122125
filter: (asset: PostcssUrlAsset) => !asset.hash && !asset.absolutePath.endsWith('.cur'),
123126
url: 'inline',
124127
// NOTE: maxSize is in KB
125-
maxSize: 10
128+
maxSize: 10,
129+
fallback: 'rebase',
126130
}
127131
]),
128132
autoprefixer(),

0 commit comments

Comments
 (0)