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?
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.
@evanw thank you so much for fixing this issue! I just tested it and everything works perfectly.
Most helpful comment
@evanw thank you so much for fixing this issue! I just tested it and everything works perfectly.