You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Source maps work correctly with @rollup/plugin-replace even with module that use query parameters as used by Vite and other plugins.
Actual Behavior
They break. Either the source is missing or both the file names and source is missing producing null. null is not even valid in sources AFAIK.
worker.ts is missing sourcesContent, it has null, test.ts has null for both sources & sourcesContent, and the browser tries to look for a file with null has its name, which is obviously wrong.
There are often warnings of the form:
Sourcemap for "/Users/segevfiner/junk/vite-worker-sourcemaps-bug/src/worker.ts" points to missing source files
Note that this is not a minimal repository as advised within the issue template, and your issue probably won't get any traction with maintainers as a result. If you're able to use one of the available reproduction methods to distill the error, you'll have a much better chance of having this addressed.
I tried to debug this further and it seems it might be an issue in Vite own sourcemaps plugin that doesn't handle it's own ids with query parameters when there are plugins that output some kinds of sourcemaps. I'll reopen there.
Expected Behavior
Source maps work correctly with
@rollup/plugin-replace
even with module that use query parameters as used by Vite and other plugins.Actual Behavior
They break. Either the source is missing or both the file names and source is missing producing
null
.null
is not even valid insources
AFAIK.worker.ts
is missingsourcesContent
, it hasnull
,test.ts
has null for bothsources
&sourcesContent
, and the browser tries to look for a file withnull
has its name, which is obviously wrong.There are often warnings of the form:
Additional Information
This might be an issue in
magic-string
, I reported it there as well Rich-Harris/magic-string#238I have hit this with Vite, but the issue can likely be caused by using query parameters with vanilla Rollup and plugins that handle them.
cc @YossiSaadi
The text was updated successfully, but these errors were encountered: