Closed alastaircoote closed 7 years ago
I'm gonna guess that the culprit is webpack doing some web worker bundling (or otherwise a sourcemap reference inside a IIFE module definition. That would create two sourcemap references inside the same file.
The unit tests pass (except one windows-specific directory permissions thing), so I'm happy.
@Rich-Harris Can we have this tagged as v0.12.1?
We actually need to re-merge this: I discovered today that I need to preserve the (now empty) line where the source map comment was, otherwise the line numbers in the mappings do not match up any more. I've actually not had to amend a merged pull request before - shall I just make another?
The regex in
sourcemap.js
appears to swallow the bottom half of a UMD/IIFE wrapper in some circumstances, when it is attempting to use globals. Like so:I've made two changes:
serveFile.js
to replace all source map comments with an empty string, then append the comment at the end, rather than replace in-place. This is also whatmap.js
does.All the tests run, but I haven't been able to isolate exactly what causes this to create a new test of my own.