# babel-plugin-node-sourcemap-support

> Adds support for sourcemaps to a node app.

Latest version **0.0.1** (published 2017-02-09) · CC0-1.0 license · 0 weekly downloads

## Install

```sh
npm install babel-plugin-node-sourcemap-support
pnpm add babel-plugin-node-sourcemap-support
yarn add babel-plugin-node-sourcemap-support
bun add babel-plugin-node-sourcemap-support
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2017-02-09 |
| First published | 2016-11-15 |
| Weekly downloads | 0 |
| License | CC0-1.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Johnny Hauser |
| Maintainers | m59 |
| Keywords | babel, plugin, sourcemap, sourcemaps, source-map, source-maps, support, node, nodejs |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-node-sourcemap-support
- Repository: https://github.com/m59peacemaker/babel-plugin-node-sourcemap-support
- Homepage: https://github.com/m59peacemaker/babel-plugin-node-sourcemap-support#readme
- Issues: https://github.com/m59peacemaker/babel-plugin-node-sourcemap-support/issues
- npm.io page: https://npm.io/package/babel-plugin-node-sourcemap-support

## Dependencies (2)

- [babylon](https://npm.io/package/babylon.md) ^6.13.1
- [fs-extra](https://npm.io/package/fs-extra.md) ^1.0.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2017-02-09
- 0.0.0 — 2016-11-15

## README

# 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

```sh
npm install babel-plugin-node-sourcemap-support
```

## example

.babelrc
```json
{
  "plugins": [
    ["node-sourcemap-support", {
      "src": "./path/to/src",
      "dest": "./path/to/out/dir",
      "entries": [
        "app.js",
        "foo/bar.js"
      ]
    }]
  ]
}
```

```sh
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.

---
_Source: https://npm.io/package/babel-plugin-node-sourcemap-support · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
