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

Fix sourcemapping url replacement #484

Merged
merged 3 commits into from
Nov 22, 2021
Merged

Conversation

dhh
Copy link
Member

@dhh dhh commented Nov 22, 2021

Includes a work-around for bug where if the sourcemap is nested two levels deep, it'll resolve as the source file that's being mapped, rather than the map itself by Sprockets. So context.resolve("a/b/c.js.map") will return c.js instead of c.js.map. This doesn't happen when the nesting is only one level deep, like a/b.js/map or if there's no nesting at all. This is a long-standing Sprockets bug we need to find and fix, but it predates this processor, though the processor tickles it.

Also, this makes sure that nested files that do no tickle the double+ nesting bug will be correctly mapped.

@dhh dhh merged commit 0a56eec into master Nov 22, 2021
@dhh dhh deleted the fix-sourcemapping-url-replacement branch November 22, 2021 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant