File tree 1 file changed +1
-21
lines changed
packages/vite/src/node/plugins
1 file changed +1
-21
lines changed Original file line number Diff line number Diff line change @@ -142,13 +142,7 @@ function emitSourcemapForWorkerEntry(
142
142
const { map : sourcemap } = chunk
143
143
144
144
if ( sourcemap ) {
145
- if ( config . build . sourcemap === 'inline' ) {
146
- // Manually add the sourcemap to the code if configured for inline sourcemaps.
147
- // TODO: Remove when https://github.com/rollup/rollup/issues/3913 is resolved
148
- // Currently seems that it won't be resolved until Rollup 3
149
- const dataUrl = sourcemap . toUrl ( )
150
- chunk . code += `//# sourceMappingURL=${ dataUrl } `
151
- } else if (
145
+ if (
152
146
config . build . sourcemap === 'hidden' ||
153
147
config . build . sourcemap === true
154
148
) {
@@ -159,20 +153,6 @@ function emitSourcemapForWorkerEntry(
159
153
type : 'asset' ,
160
154
source : data ,
161
155
} )
162
-
163
- // Emit the comment that tells the JS debugger where it can find the
164
- // sourcemap file.
165
- // 'hidden' causes the sourcemap file to be created but
166
- // the comment in the file to be omitted.
167
- if ( config . build . sourcemap === true ) {
168
- // inline web workers need to use the full sourcemap path
169
- // non-inline web workers can use a relative path
170
- const sourceMapUrl =
171
- query ?. inline != null
172
- ? mapFileName
173
- : path . relative ( config . build . assetsDir , mapFileName )
174
- chunk . code += `//# sourceMappingURL=${ sourceMapUrl } `
175
- }
176
156
}
177
157
}
178
158
You can’t perform that action at this time.
0 commit comments