Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AssetMapper] Fixing bug where JSCompiler used non-absolute importmap entry path #52368

Conversation

weaverryan
Copy link
Member

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues None
License MIT

Introduced over the weekend in #52349.

The path key inside importmap.php can be a full filesystem path or it can start with ./ to indicate a relative path to the root directory. That has been the case for weeks. In #52349, when start using the path of an importmap entry to find the MappedAsset. When doing that, I didn't consider the case where path is a relative path.

This PR fixes that and moves the code handling this into ImportMapConfigReader so that we're not repeating it in several places.

Cheers!

@nicolas-grekas nicolas-grekas force-pushed the asset-mapper-fix-importmap-path-conversion branch from 489c790 to 31d04ef Compare October 31, 2023 07:55
@nicolas-grekas
Copy link
Member

Thank you @weaverryan.

@nicolas-grekas nicolas-grekas merged commit 1781648 into symfony:6.4 Oct 31, 2023
7 of 9 checks passed
@weaverryan weaverryan deleted the asset-mapper-fix-importmap-path-conversion branch October 31, 2023 13:36
This was referenced Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants