Registry /
devops / babel-plugin-source-map-support
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
default export
✓ import pkg from 'babel-plugin-source-map-support'
✗ const pkg = require('babel-plugin-source-map-support')
Plugin is typically used via Babel config (string name 'source-map-support'), not imported directly. If importing programmatically, use ESM default import.
Babel config plugin entry
✓ plugins: ['source-map-support']
✗ plugins: ['babel-plugin-source-map-support']
Babel resolves plugin names without the 'babel-plugin-' prefix; use 'source-map-support' in plugins array.
Install plugin and runtime, configure in Babel, compile a file to see automatic source map support registration.
// Install: npm install --save-dev babel-plugin-source-map-support source-map-support
// .babelrc
{
"plugins": ["source-map-support"],
"sourceMaps": "inline"
}
// Input: test.js
import foo from 'foo';
foo();
// Compile: npx babel test.js --out-file test-compiled.js
// Output: test-compiled.js will have import 'source-map-support/register' prepended
Errors
Common errors & fixes
Error: Cannot find module 'source-map-support/register'
source-map-support package not installed or not in node_modules
fixRun: npm install --save source-map-support
Babel 6 is not supported
Plugin requires Babel 7+; earlier versions not compatible
fixUpgrade Babel to version 7 or later, or use an older version of the plugin (not recommended).
Stack traces still show transpiled line numbers
Source maps not generated or not loaded; plugin only adds registration, source maps must be generated separately
fixEnable source maps in Babel config: 'sourceMaps: true' or 'sourceMaps: "inline"'
Audit
Dependencies
source-map-supportrequiredruntime peer dependency; must be installed separately for the plugin to work