Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-source-map-support-for-6

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-source-map-support-for-6

A Babel6 verion fork.A Babel plugin which automatically makes stack traces source-map aware

  • 0.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-source-map-support

npm status build status

A Babel plugin which automatically makes stack traces source-map aware

INSTALL

npm install babel-plugin-source-map-support

SYNOPSIS

$ cat test.js


import foo from 'foo';
import bar from 'bar';

test();

$ babel test.js

'use strict';

var foo = require('foo');
var bar = require('bar');

test();

$ babel --plugins source-map-support test.js

'use strict';

require('source-map-support/register');

var foo = require('foo');
var bar = require('bar');

test();

DESCRIPTION

This is a Babel plugin which prepends a statement equivalent to the following to source files:

require('source-map-support/register');

In conjunction with the source-map-support module, which must be installed separately, this statement hooks into the v8 stack trace API to translate call sites in the transpiled code back to their corresponding locations in the original code.

Note: this only works in environments which support the v8 stack trace API (e.g. Node.js and Chrome), though it is harmless in other environments.

The source-map-support module only needs to be registered in the top-level file of an application, but it no-ops if it has already been loaded, so there is no harm in registering it in every file.

CAVEATS

Source maps must currently be inline. While the source-map-support module provides a way to associate a file with an external source map, that is not currently supported by this plugin.

SEE ALSO

VERSION

0.0.1

AUTHOR

chocolateboy

Copyright © 2015 by chocolateboy

This module is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0.

Keywords

FAQs

Package last updated on 13 Mar 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc