![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
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 2 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
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.