Registry / babel-preset-es2020

babel-preset-es2020

JSON →
library1.0.2jsnpmunverified

A Babel preset that includes only a subset of ES6 (ES2015) features, intentionally omitting most modern JavaScript additions. Version 1.0.2 is the latest and final release, with no active development since 2016. This package is a joke/experimental preset with very low download numbers. Key differentiator: it's a minimal, opinionated subset of ES6 for those who believe 'we can do without most of it.' Not recommended for real-world use.

npm install babel-preset-es2020
INSTALL
IMPORT
SIG · BABEL-PRESET-ES202
B
babel-preset-es2020
javascriptv1.0.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
In .babelrc: "presets": ["es2020"] OR in code: module.exports = require('babel-preset-es2020')
import pkg from 'babel-preset-es2020'
Babel presets are typically used as string names in config, not imported. If using programmatically, require() works due to CJS.
es2020
Via Node API: require('babel-core').transform('code', { presets: [require('babel-preset-es2020')] })
import { es2020 } from 'babel-preset-es2020'
Named export does not exist; the preset is exported as default (a function).

Shows how to use the preset in a .babelrc configuration file.

{ "presets": ["es2020"] }
Debug
Known issues
gotchaThis preset only includes a subset of ES6 features, not ES2020. It will not transform most modern JavaScript.
fix
Use @babel/preset-env for comprehensive and up-to-date transforms.
affects: >=1.0.0
deprecatedPackage is effectively abandoned with no releases since 2016. It uses old Babel 6 APIs.
fix
Do not use this preset; switch to @babel/preset-env.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Plugin/Preset files are not allowed to export objects, only functions.
Using an older version of Babel (6) that expects presets to be functions, but this preset is a plain object? Actually it exports a function, but this error may occur with newer Babel (7+) because the preset is not compatible.
fix
Use Babel 6 or switch to @babel/preset-env for Babel 7+.
Error: Cannot find module 'babel-preset-es2020'
Module not installed.
fix
Run npm install --save-dev babel-preset-es2020
Upgrade
Version history
1.0.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
babel-preset-es2020 — npm install babel-preset-es2020 · libregistry