Webpack loader that adjusts source maps for debugging or inter-loader transformation. Currently at v5.0.0, released in 2025? Release cadence is irregular with major bumps alongside webpack majors. Key differentiator: it can be used both as a loader and as a module filename template to control output source map format (absolute, outputRelative, projectRelative, webpackProtocol, sourceRelative). Alternatives (like Webpack's built-in devtool) offer less granular control over intermediate source maps.
npm install adjust-sourcemap-loaderVerified import paths — ran on the pinned version, not inferred.
Shows how to use adjust-sourcemap-loader both as a loader (with format option) and as a module filename template (for final output sources).
Upgrade Node to >=12 and ensure Webpack is version 5 or higher.
Adjust your webpack config to provide explicit options objects where previously undefined was allowed.
Use the 'fail' option to ensure errors are thrown if a source-map source cannot be decoded.
Add ?sourceMap or sourceMaps: true to the preceding loader, e.g., babel?sourceMap.
Use a different format (e.g., 'projectRelative') for the module filename template.
If you specify custom codecs, also include the built-in codecs from require('adjust-sourcemap-loader').codecs.Add sourceMaps: true option to the loader that generates source maps (e.g., babel-loader).
Ensure adjust-sourcemap-loader is included in your module.rules as a loader (e.g., use: ['adjust-sourcemap?format=absolute', 'babel-loader']).
Run 'npm install adjust-sourcemap-loader --save-dev'.
No dependency data recorded yet.