Skip to content

Commit 961a5ee

Browse files
Fix source maps generation
Enabling the `sourceMap` option always crashed the plugin for me. So I went through the code and noticed that `inputSourceMap` should be passed to the `transfer` function from `multi-stage-sourcemap` instead of `inputSource`
1 parent 041928c commit 961a5ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class WebpackObfuscator {
4242
if (this.options.sourceMap && inputSourceMap) {
4343
const transferredSourceMap = transferSourceMap({
4444
fromSourceMap: obfuscationSourceMap,
45-
toSourceMap: inputSource
45+
toSourceMap: inputSourceMap
4646
});
4747

4848
compilation.assets[fileName] = new SourceMapSource(
@@ -89,4 +89,4 @@ class WebpackObfuscator {
8989
}
9090
}
9191

92-
export = WebpackObfuscator;
92+
export = WebpackObfuscator;

0 commit comments

Comments
 (0)