perf: use magic-string hires boundary for sourcemaps
This commit is contained in:
parent
61eb32aa04
commit
4924e36d74
|
@ -173,7 +173,7 @@ export default function assetPlugin(): Plugin {
|
||||||
if (s) {
|
if (s) {
|
||||||
return {
|
return {
|
||||||
code: s.toString(),
|
code: s.toString(),
|
||||||
map: sourcemap ? s.generateMap({ hires: true }) : null
|
map: sourcemap ? s.generateMap({ hires: 'boundary' }) : null
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return null
|
return null
|
||||||
|
|
|
@ -222,7 +222,7 @@ export function bytecodePlugin(options: BytecodeOptions = {}): Plugin | null {
|
||||||
if (s) {
|
if (s) {
|
||||||
return {
|
return {
|
||||||
code: s.toString(),
|
code: s.toString(),
|
||||||
map: config.build.sourcemap ? s.generateMap({ hires: true }) : null
|
map: config.build.sourcemap ? s.generateMap({ hires: 'boundary' }) : null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -56,7 +56,7 @@ export default function esmShimPlugin(): Plugin {
|
||||||
s.appendRight(indexToAppend, CJSShim)
|
s.appendRight(indexToAppend, CJSShim)
|
||||||
return {
|
return {
|
||||||
code: s.toString(),
|
code: s.toString(),
|
||||||
map: sourcemap ? s.generateMap({ hires: true }) : null
|
map: sourcemap ? s.generateMap({ hires: 'boundary' }) : null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ export default function workerPlugin(): Plugin {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
code: s.toString(),
|
code: s.toString(),
|
||||||
map: sourcemap ? s.generateMap({ hires: true }) : null
|
map: sourcemap ? s.generateMap({ hires: 'boundary' }) : null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue