Skip to content

Commit

Permalink
fix(@angular/cli): correct CSS resource resolving
Browse files Browse the repository at this point in the history
  • Loading branch information
clydin authored and Brocco committed Jan 19, 2018
1 parent e9deadc commit f544fee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/@angular/cli/models/webpack-configs/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ export function getStylesConfig(wco: WebpackConfigOptions) {
postcssImports({
resolve: (url: string, context: string) => {
return new Promise<string>((resolve, reject) => {
if (url && url.startsWith('~')) {
url = url.substr(1);
}
loader.resolve(context, url, (err: Error, result: string) => {
if (err) {
reject(err);
Expand Down Expand Up @@ -110,7 +113,8 @@ export function getStylesConfig(wco: WebpackConfigOptions) {
filter: (asset: PostcssUrlAsset) => !asset.hash && !asset.absolutePath.endsWith('.cur'),
url: 'inline',
// NOTE: maxSize is in KB
maxSize: 10
maxSize: 10,
fallback: 'rebase',
}
]),
autoprefixer(),
Expand Down

0 comments on commit f544fee

Please sign in to comment.