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

URL encoding link to map files #3982

Open
sorskoot opened this issue Nov 20, 2024 · 1 comment
Open

URL encoding link to map files #3982

sorskoot opened this issue Nov 20, 2024 · 1 comment
Labels

Comments

@sorskoot
Copy link

Issue

When a space is present in the filename of a Javascript file, this space also appears in the link to the map file at the end of a bundle.
Like //# sourceMappingURL=Some Random File.js.map . This will result in the map file not being found.

Expected behavior

By encoding it correctly there are now actual spaces anymore and the browser can show the correct file
//# sourceMappingURL=Some%20Random%20File.js.map

@evanw
Copy link
Owner

evanw commented Dec 20, 2024

I agree that this should be fixed. However, it sounds like something that could break existing code that finds the source mapping URL in esbuild's output using regular expressions and string manipulation. So I'm going to wait until the next breaking change release to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants