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

bad source maps with code splitting #303

Closed
nitsky opened this issue Jul 30, 2020 · 2 comments
Closed

bad source maps with code splitting #303

nitsky opened this issue Jul 30, 2020 · 2 comments

Comments

@nitsky
Copy link
Contributor

nitsky commented Jul 30, 2020

I am observing incorrect source maps when code splitting is enabled. The filenames and line numbers in the source maps are all wrong, and in some cases the line numbers are out of bounds of the referenced file. This happens with or without minification, but without code splitting all source maps are correct. The project I am observing this on has dozens of entrypoints and tens of thousands of lines of typescript. I tried to make a small, reproducible example, but with simple code and a small number of entrypoints, all source maps were correct. I am not sure what could be triggering this problem. Any ideas?

@evanw
Copy link
Owner

evanw commented Jul 31, 2020

Thank you very much for reporting this. You're right, they were completely wrong. I wasn't taking into account the injected cross-chunk import statements. That should be fixed in version 0.6.13 along with a lot of other source map stuff (I did a lot of testing and found some other issues too). You can read about what I fixed in the release notes.

@nitsky
Copy link
Contributor Author

nitsky commented Aug 1, 2020

@evanw thank you so much for fixing this issue! I just tested it and everything works perfectly.

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

No branches or pull requests

2 participants