babel-preset-latest-node
babel preset latest for node 13 (Current), node 12 (Active LTS) node 10 (Maintenance LTS)
Last updated 4 months ago by churpeau .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install babel-preset-latest-node 
SYNC missed versions from official npm registry.

babel-preset-latest-node

babel preset latest for node 13 (Current), node 12 (Active LTS) node 10 (Maintenance LTS)

babel 7

Since v2, this package requires @babel/core@^7.0.0. If you use babel 6, you can still use the version "1.0.0" of this package. If you want to migrate, you can read the announcement and the official migration guide.

Alternatives

Options

  • target: 10, 10.13, 11, 12, 13 or 'current' (process.versions.node)
  • loose: Enable “loose” transformations for any plugins in this preset that allow them (Disabled by default).
  • modules - Enable transformation of ES6 module syntax to another module type (Enabled by default to "commonjs"). Can be false to not transform modules, or "commonjs"
  • es2019 - Enable es2019 features (Enabled by default)
  • shippedProposals - Enable features in stages but already available in recent node version (Enabled by default)

Compatibility Table

Feature Node 10 Node 10.13 Node 11/12/13 Node 13.3

ES2015

transform-modules-commonjs flag flag flag yes with .mjs, use modules: false

ES2019

syntax-optional-catch-binding flag yes yes yes

Shipped Proposals

syntax-json-strings yes yes yes yes
nullish-coalescing-operator no no no flag
optional-chaining no no no flag

Install

npm install --save-dev @babel/core babel-preset-latest-node
yarn add --dev @babel/core babel-preset-latest-node

Usage

Via .babelrc

.babelrc

{
  "presets": ["latest-node"]
}
{
  "presets": [["latest-node", { "target": "current" }]]
}

Via CLI

babel script.js --presets latest-node

Via Node API

require('babel-core').transform('code', {
  presets: [require('babel-preset-latest-node')],
});
require('babel-core').transform('code', {
  presets: [[require('babel-preset-latest-node'), { target: 'current' }]],
});

Current Tags

  • 4.1.0                                ...           latest (4 months ago)
  • 2.0.0-beta.3                                ...           next (2 years ago)

23 Versions

  • 4.1.0                                ...           4 months ago
  • 4.0.1                                ...           8 months ago
  • 4.0.0                                ...           8 months ago
  • 3.2.1                                ...           a year ago
  • 3.2.0                                ...           a year ago
  • 3.1.1                                ...           a year ago
  • 3.1.0                                ...           a year ago
  • 3.0.1                                ...           2 years ago
  • 3.0.0                                ...           2 years ago
  • 2.1.0                                ...           2 years ago
  • 2.0.2                                ...           2 years ago
  • 2.0.1                                ...           2 years ago
  • 2.0.0-beta.3                                ...           2 years ago
  • 2.0.0-beta.2                                ...           2 years ago
  • 2.0.0-beta.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 0.4.0                                ...           3 years ago
  • 0.3.1                                ...           3 years ago
  • 0.3.0                                ...           3 years ago
  • 0.2.2                                ...           3 years ago
  • 0.2.1                                ...           3 years ago
  • 0.2.0                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 15
This Week 15
This Month 61
Last Day 2
Last Week 45
Last Month 270

Copyright 2014 - 2016 © taobao.org |