babel-preset-es2020

raw JSON →
1.0.2 verified Sat Apr 25 auth: no javascript deprecated

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.

error Error: Plugin/Preset files are not allowed to export objects, only functions.
cause 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 Error: Cannot find module 'babel-preset-es2020'
cause Module not installed.
fix
Run npm install --save-dev babel-preset-es2020
gotcha This 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.
deprecated Package 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.
npm install babel-preset-es2020
yarn add babel-preset-es2020
pnpm add babel-preset-es2020

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

{
  "presets": ["es2020"]
}