There was an error while loading. Please reload this page.
1 parent 08170d1 commit e9b256dCopy full SHA for e9b256d
1 file changed
src/rollup/plugins/sourcemap-min.ts
@@ -15,9 +15,10 @@ export function sourcemapMininify() {
15
}
16
// Parse sourcemap
17
const sourcemap: ExistingRawSourceMap = JSON.parse(asset.source);
18
- // Only process sourcemaps with node_module sources
+ // Only wipe mappings when every source is from node_modules, so that
19
+ // chunks mixing user code with hoisted library code keep their mappings
20
if (
- !(sourcemap.sources || []).some((s) => s.includes("node_modules"))
21
+ !(sourcemap.sources || []).every((s) => s.includes("node_modules"))
22
) {
23
continue;
24
0 commit comments