babel-plugin-transform-es2015-classes weekly downloads statistics
By babel (206 listings) · npm · Babel plugins
Compile ES2015 classes to ES5
babel-plugin-transform-es2015-classes has 1,340,315 recorded weekly downloads on npm, a decrease of 4.6% over the past 30 days, ranking #256 of 3,247 tracked listings.
About babel-plugin-transform-es2015-classes
babel-plugin-transform-es2015-classes
Compile ES2015 classes to ES5
Caveats
Built-in classes such as Date, Array, DOM etc cannot be properly subclassed
due to limitations in ES5 (for the es2015-classes plugin).
You can try to use babel-plugin-transform-builtin-extend based on Object.setPrototypeOf and Reflect.construct, but it also has some limitations.
Installation
npm install --save-dev babel-plugin-transform-es2015-classes
Usage
Via .babelrc (Recommended)
.babelrc
// without options
{
"plugins": ["transform-es2015-classes"]
}
// with options
{
"plugins": [
["transform-es2015-classes", {
"loose": true
}]
]
}
Via CLI
babel --plugins transform-es2015-classes script.js
Via Node API
require("babel-core").transform("code", {
plugins: ["transform-es2015-classes"]
});
Options
loose
boolean, defaults to false.
Method enumerability
Please note that in loose mode class methods are enumerable. This is not in line with the spec and you may run into issues.
Method assignment
Under loose mode, methods are defined on the class prototype with simple assignments instead of being defined. This can result in the following not working:
class Foo {
set bar() {
throw new Error("foo!");
}
}
class Bar extends Foo {
bar() {
// will throw an error when this method is defined
}
}
When Bar.prototype.foo is defined it triggers the setter on Foo. This is a
case that is very unlikely to appear in production code however it's something
to keep in mind.
Description from the npm listing.
- babel-plugin
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (170)Similar npm Babel plugins plugins
All 20 babel-plugin-transform-es2015-classes alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/babel-plugin-transform-es2015-classes. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.