Webpack loader that extracts inline and linked source maps from JavaScript files, including from node_modules, so webpack can process them for the generated bundle. Current stable version is 5.0.0 (2024-01-15), with major releases roughly yearly. Key differentiator: it ensures source map continuity across third-party libraries, preventing misinterpretation by browsers. Requires webpack 5+ and Node.js 18.12+ as of v5. Supports a filterSourceMappingUrl option to control per-file behavior.
npm install source-map-loaderVerified import paths — ran on the pinned version, not inferred.
Configures source-map-loader to process all JavaScript files before other loaders, extracting source maps. Includes ignoring parse warnings typical for third-party libraries.
Upgrade Node.js to >=18.12.0
Upgrade Node.js to >=14.15.0
Upgrade webpack to >=5
Use exclude: /node_modules/ in rule to avoid processing third-party maps if not needed
No action needed; it's internal
Ensure the source map file exists or use filterSourceMappingUrl to skip/remove the URL
Update the library providing the source map or ignore warnings via ignoreWarnings config
Reinstall source-map-loader: npm install source-map-loader --save-dev