Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
babel-plugin-source-map-support-for-6
Advanced tools
A Babel6 verion fork.A Babel plugin which automatically makes stack traces source-map aware
A Babel plugin which automatically makes stack traces source-map aware
npm install babel-plugin-source-map-support
$ 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();
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.
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.
0.0.1
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.
FAQs
A Babel6 verion fork.A Babel plugin which automatically makes stack traces source-map aware
We found that babel-plugin-source-map-support-for-6 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.