-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AssetMapper] Fix JsDeliver import regexp
Following import were not handled, due to the `$`. ```js import jQuery$1 from "/npm/[email protected]/+esm"; ``` This PR updates the regex to handle this case.
- Loading branch information
Showing
2 changed files
with
8 additions
and
1 deletion.
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
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 |
---|---|---|
|
@@ -686,6 +686,13 @@ public static function provideImportRegex(): iterable | |
['datatables.net-select', '1.7.0'], | ||
], | ||
]; | ||
|
||
yield 'import with name containing a dollar sign' => [ | ||
'import jQuery$1 from "/npm/[email protected]/+esm";', | ||
[ | ||
['jquery', '3.7.0'], | ||
], | ||
]; | ||
} | ||
|
||
private static function createRemoteEntry(string $importName, string $version, ImportMapType $type = ImportMapType::JS, ?string $packageSpecifier = null): ImportMapEntry | ||
|