You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

babel-plugin-node-sourcemap-support

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-node-sourcemap-support

Adds support for sourcemaps to a node app.

0.0.0
Source
npm
Version published
Weekly downloads
5
150%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-node-sourcemap-support

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.

install

npm install babel-plugin-node-sourcemap-support

example

.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

options

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.

Keywords

babel

FAQs

Package last updated on 15 Nov 2016

Did you know?

Socket

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.

Install

Related posts