Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
babel-preset-node6-without-strict
Advanced tools
Babel preset for Node 6.x (ES6 / ES2015) without strict
Node 6.x comes with V8 v5.x which brings ~93% native ES6/ES2015 coverage. This preset for Babel 6 attempts to bridge the gap for the much of the remaining ~7% using Babel plug-ins.
Based on Node.js v6.0.0
Babel 6.x is awesome, but simply including the ES2015 preset means you're transpiling features that your Node 6.x installation can already do faster and natively, replacing them with inferior / older code.
This preset complements existing V8-native functionality - it doesn't work around it.
The end result is nearly always a faster build and script execution time.
Install via NPM the usual way:
npm i babel-preset-node6
.babelrc
(recommended)Create a .babelrc
file in your project root, and include 'node5' in your preset path:
{
"presets": [
"node6"
]
}
Now whenever you run babel-node
, it will polyfill your app with the remaining ES2015 features that Node 6 is missing.
$ babel script.js --presets node6
If you don't want to use a project-wide .babelrc
file (as above):
require("babel-core").transform("code", {
presets: ["node6"]
});
And if you do, and you want to use vanilla node
instead of babel-node
as your CLI, you can create an entry script that references your pre-transpiled code like so:
require('babel-register');
require('path/to/es6/script');
... which will then run everywhere Node can.
Of course, make sure to npm i -S babel-core
or npm i -S babel-register
respectively, to grab the NPM packages you'll need to transpile on-the-fly.
Follow vendor instructions and include node6
in your babel "preset" list.
Babel has a ready-made preset for React, and you now need to install it separately.
Just grab it via NPM:
npm i babel-preset-react
And then add it to your "presets" list in .babelrc
:
{
"presets": [
"node6",
"react"
]
}
Forked and updated from @leebenson's node5 preset.
FAQs
Babel preset for Node 6.x (ES6 / ES2015) without strict
The npm package babel-preset-node6-without-strict receives a total of 42 weekly downloads. As such, babel-preset-node6-without-strict popularity was classified as not popular.
We found that babel-preset-node6-without-strict 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.