-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(css): import using imports field in CS was not resolved (#15985)
Co-authored-by: Hiroshi Ogawa <[email protected]>
- Loading branch information
1 parent
4fe971f
commit a839c14
Showing
9 changed files
with
62 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -125,7 +125,8 @@ | |
}, | ||
"patchedDependencies": { | ||
"[email protected]": "patches/[email protected]", | ||
"[email protected]": "patches/[email protected]" | ||
"[email protected]": "patches/[email protected]", | ||
"[email protected]": "patches/[email protected]" | ||
}, | ||
"peerDependencyRules": { | ||
"allowedVersions": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
diff --git a/lib/parse-styles.js b/lib/parse-styles.js | ||
index 68a1fef604fad82ac367f6bd63e845027bf86089..4617545e86301f58bfcd649f66c0536e29bda50f 100644 | ||
--- a/lib/parse-styles.js | ||
+++ b/lib/parse-styles.js | ||
@@ -223,19 +223,20 @@ function isProcessableURL(uri) { | ||
return false | ||
} | ||
|
||
- // check for fragment or query | ||
- try { | ||
- // needs a base to parse properly | ||
- const url = new URL(uri, "https://example.com") | ||
- | ||
- if (url.hash) { | ||
- return false | ||
- } | ||
- | ||
- if (url.search) { | ||
- return false | ||
- } | ||
- } catch {} // Ignore | ||
+ // PATCH: comment out this part to support resolving imports field | ||
+ // // check for fragment or query | ||
+ // try { | ||
+ // // needs a base to parse properly | ||
+ // const url = new URL(uri, "https://example.com") | ||
+ | ||
+ // if (url.hash) { | ||
+ // return false | ||
+ // } | ||
+ | ||
+ // if (url.search) { | ||
+ // return false | ||
+ // } | ||
+ // } catch {} // Ignore | ||
|
||
return true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.imports-field { | ||
color: red; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@import '#imports'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.