A list of awesome Babel plugins, presets, etc. Many of these are from the community, but some are lesser-known plugins in the Babel organization that may be useful to you.
As always, use caution when trying out Babel plugins, especially those marked as 🔧 experimental or 🔧🚧 under construction.
If you want to contribute, please read the contribution guidelines.
Error and Array, which require special treatment and require static analysis to detect.__VERSION__ to pkg.version.require('~/foo') syntax.require('#/path') instead of require('../../path'), the number of ../ needed is worked out by the plugin__self property to JSX tags for debugging. Don't use in production. More infoReact.createElement() with a helper that is more optimized for production.Component if a class renders a JSX element, also adds import statement if it detects a JSX component in the file.r-if、r-for in jsx just as v-if、v-for in Vue..forEach and .map calls to for loops. 🔧Array methods into faster equivalents. 🔧JSON.parse.iota(). 🔧console.log() calls.~ operator, transforming, for example, ~x in () => x.& operator, for example, toUpper & console.log.await every Promise in async functions._). 🔧_). 🔧+ or === for specific classes. 🔧🚧78 followers · starred Apr 2017
148 followers · starred Apr 2017
43 followers · starred May 2017
80 followers · starred Jul 2024
A list of awesome Babel plugins, presets, etc. Many of these are from the community, but some are lesser-known plugins in the Babel organization that may be useful to you.
As always, use caution when trying out Babel plugins, especially those marked as 🔧 experimental or 🔧🚧 under construction.
If you want to contribute, please read the contribution guidelines.
Error and Array, which require special treatment and require static analysis to detect.__VERSION__ to pkg.version.require('~/foo') syntax.require('#/path') instead of require('../../path'), the number of ../ needed is worked out by the plugin__self property to JSX tags for debugging. Don't use in production. More infoReact.createElement() with a helper that is more optimized for production.Component if a class renders a JSX element, also adds import statement if it detects a JSX component in the file.r-if、r-for in jsx just as v-if、v-for in Vue..forEach and .map calls to for loops. 🔧Array methods into faster equivalents. 🔧JSON.parse.iota(). 🔧console.log() calls.~ operator, transforming, for example, ~x in () => x.& operator, for example, toUpper & console.log.await every Promise in async functions._). 🔧_). 🔧+ or === for specific classes. 🔧🚧78 followers · starred Apr 2017
148 followers · starred Apr 2017
43 followers · starred May 2017
80 followers · starred Jul 2024