Skip to content

Commit 2a3796e

Browse files
alan-agius4clydin
authored andcommitted
fix(@angular-devkit/build-angular): stylus not resolving imports from libraries
- Adds usage of webpackImporter https://www.npmjs.com/package/stylus-loader#webpackimporter - Removes resolve-url-loader usage since stylus handles resolve paths https://stylus-lang.com/docs/js.html#stylusresolveroptions Closes #19524 (cherry picked from commit 227804f)
1 parent 725a6ae commit 2a3796e

File tree

4 files changed

+6
-13
lines changed

4 files changed

+6
-13
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@
212212
"speed-measure-webpack-plugin": "1.3.3",
213213
"style-loader": "2.0.0",
214214
"stylus": "0.54.7",
215-
"stylus-loader": "4.1.1",
215+
"stylus-loader": "4.3.1",
216216
"symbol-observable": "2.0.3",
217217
"tar": "^6.0.0",
218218
"temp": "^0.9.0",

packages/angular_devkit/build_angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"speed-measure-webpack-plugin": "1.3.3",
6565
"style-loader": "2.0.0",
6666
"stylus": "0.54.8",
67-
"stylus-loader": "4.1.1",
67+
"stylus-loader": "4.3.1",
6868
"terser": "5.3.7",
6969
"terser-webpack-plugin": "4.2.3",
7070
"text-table": "0.2.0",

packages/angular_devkit/build_angular/src/webpack/configs/styles.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,10 @@ export function getStylesConfig(wco: WebpackConfigOptions) {
133133
{
134134
test: /\.styl$/,
135135
use: [
136-
{
137-
loader: require.resolve('resolve-url-loader'),
138-
options: {
139-
sourceMap: cssSourceMap,
140-
},
141-
},
142136
{
143137
loader: require.resolve('stylus-loader'),
144138
options: {
145139
sourceMap: cssSourceMap,
146-
webpackImporter: false,
147140
stylusOptions: {
148141
compress: false,
149142
sourceMap: { comment: false },

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11628,10 +11628,10 @@ stylehacks@^4.0.0:
1162811628
postcss "^7.0.0"
1162911629
postcss-selector-parser "^3.0.0"
1163011630

11631-
stylus-loader@4.1.1:
11632-
version "4.1.1"
11633-
resolved "https://registry.yarnpkg.com/stylus-loader/-/stylus-loader-4.1.1.tgz#0e94f5d6274932a2dad054d1a736b32146ac7a99"
11634-
integrity sha512-Vnm7J/nIs/P6swIrdwJW/dflhsCOiFmb1U3PeQ6phRtg1soPLN4uKnnL7AtGIJDe173elbtYIXVzmCyF493CfA==
11631+
stylus-loader@4.3.1:
11632+
version "4.3.1"
11633+
resolved "https://registry.yarnpkg.com/stylus-loader/-/stylus-loader-4.3.1.tgz#8b4e749294d9fe0729c2e5e1f04cbf87e1c941aa"
11634+
integrity sha512-apDYJEM5ZpOAWbWInWcsbtI8gHNr/XYVcSY/tWqOUPt7M5tqhtwXVsAkgyiVjhuvw2Yrjq474a9H+g4d047Ebw==
1163511635
dependencies:
1163611636
fast-glob "^3.2.4"
1163711637
klona "^2.0.4"

0 commit comments

Comments
 (0)