
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
babel-plugin-node-sourcemap-support
Advanced tools
Adds support for sourcemaps to a node app in a hacky fashion.
The plugin shamefully depends on adding a module to your project directory. A require statement is inserted into your entry files to require the source-map-support module.
It can be argued that it is a better idea to install source-map-support
into your project and require it yourself.
npm install babel-plugin-node-sourcemap-support
.babelrc
{
"plugins": [
["node-sourcemap-support", {
"src": "./path/to/src",
"dest": "./path/to/out/dir",
"entries": [
"app.js",
"foo/bar.js"
]
}]
]
}
babel --source-maps inline ./path/to/src --out-dir ./path/to/out/dir
src: string, ./src
path to source files directory
dest: string, ./build
path to transpiled files directory
entries: [], ['index.js']
array of app entry file paths, relative to src
supportModulePath: string, _build-modules/source-map-support-register.js
path where the module will be added, relative to dest
cache: boolean, true
You probably should not turn this off. It prevents the support module from being redundantly copied to dest
every time babel transpiles a file.
FAQs
Adds support for sourcemaps to a node app.
The npm package babel-plugin-node-sourcemap-support receives a total of 4 weekly downloads. As such, babel-plugin-node-sourcemap-support popularity was classified as not popular.
We found that babel-plugin-node-sourcemap-support demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.