Closed LavaTile closed 3 years ago
Please try 3.3.2
Source maps now work correctly with 3.3.2
, thank you! 👍
As of version 3.5.1, the plugin stopped generating source maps.
We need source maps to be able to debug apps in production.
Any updates on this?
Reproduction repository: https://github.com/LavaTile/webpack-obfuscator-sourcemap-bug
The plugin is not generating sourcemaps with the config provided in
webpack.original.js
andwebpack.common.js
.I've managed to trace the issue, and it seems like the compilation stage that the Plugin is currently using does not provide sourcemaps for input assets.
Snippet from
webpack-obfuscator/plugin/index.ts
:With the current compilation stage of
PROCESS_ASSETS_STAGE_SUMMARIZE
, the return value ofinputSourceMap
is always null. This means that the plugin never merges the sourcemaps generated during obfuscation with the input sourcemaps.If the compilation stage is changed to
PROCESS_ASSETS_STAGE_DEV_TOOLING
, theninputSourceMaps
is defined, sourcemaps are merged as expected and correct (usable).map
files are written to the output directory.This is what I've done in the forked
LavaTile/webpack-obfuscator
repository (used inwebpack.patched.js
)Outputs of both original and patched version of the library can be found in
dist/
and validated using https://sokra.github.io/source-map-visualization/#custom-choose