Skip to content

Commit 6831492

Browse files
committed
fix(@angular/cli): update postcss loader and URL versions.
1 parent 4ebf518 commit 6831492

File tree

4 files changed

+133
-113
lines changed

4 files changed

+133
-113
lines changed

package-lock.json

+122-103
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@
7676
"opn": "~5.1.0",
7777
"portfinder": "~1.0.12",
7878
"postcss-custom-properties": "^6.1.0",
79-
"postcss-loader": "^1.3.3",
80-
"postcss-url": "^5.1.2",
79+
"postcss-loader": "^2.0.8",
80+
"postcss-url": "^7.1.2",
8181
"raw-loader": "^0.5.1",
8282
"resolve": "^1.1.7",
8383
"rxjs": "^5.5.2",

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

+7-6
Original file line numberDiff line numberDiff line change
@@ -59,23 +59,24 @@ export function getStylesConfig(wco: WebpackConfigOptions) {
5959

6060
return [
6161
postcssUrl({
62-
url: (URL: string) => {
62+
url: (URL: { url: string }) => {
63+
const { url } = URL;
6364
// Only convert root relative URLs, which CSS-Loader won't process into require().
64-
if (!URL.startsWith('/') || URL.startsWith('//')) {
65-
return URL;
65+
if (!url.startsWith('/') || url.startsWith('//')) {
66+
return URL.url;
6667
}
6768

6869
if (deployUrl.match(/:\/\//)) {
6970
// If deployUrl contains a scheme, ignore baseHref use deployUrl as is.
70-
return `${deployUrl.replace(/\/$/, '')}${URL}`;
71+
return `${deployUrl.replace(/\/$/, '')}${url}`;
7172
} else if (baseHref.match(/:\/\//)) {
7273
// If baseHref contains a scheme, include it as is.
7374
return baseHref.replace(/\/$/, '') +
74-
`/${deployUrl}/${URL}`.replace(/\/\/+/g, '/');
75+
`/${deployUrl}/${url}`.replace(/\/\/+/g, '/');
7576
} else {
7677
// Join together base-href, deploy-url and the original URL.
7778
// Also dedupe multiple slashes into single ones.
78-
return `/${baseHref}/${deployUrl}/${URL}`.replace(/\/\/+/g, '/');
79+
return `/${baseHref}/${deployUrl}/${url}`.replace(/\/\/+/g, '/');
7980
}
8081
}
8182
}),

packages/@angular/cli/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@
6060
"opn": "~5.1.0",
6161
"portfinder": "~1.0.12",
6262
"postcss-custom-properties": "^6.1.0",
63-
"postcss-loader": "^1.3.3",
64-
"postcss-url": "^5.1.2",
63+
"postcss-loader": "^2.0.8",
64+
"postcss-url": "^7.1.2",
6565
"raw-loader": "^0.5.1",
6666
"resolve": "^1.1.7",
6767
"rxjs": "^5.5.2",

0 commit comments

Comments
 (0)