Skip to content
Babel preset including only needed ES2015+ plugins
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Babel preset including only needed ES2015+ plugins using feature detection.


$ npm install --save-dev babel-preset-latest-minimal


Add preset to your .babelrc file:

  "presets": ["latest-minimal"]


For convenience, the module provides a command line utility to list the current plugins needed according to the version of node present in the system.

$ node --version
$ babel-node-list-required
[ 'transform-es2015-object-super',
  'transform-async-to-generator' ]


When using the fantastic Babel transpiler in building web applications with the latest and greatest ECMAScript features, it is advisable and safer to include all plugins from babel-preset-latest due to the fact that the runtime environment (the browser) is unknown at build-time. Anyway, when developing a Node.JS or an Electron application, the environment is controlled and Babel plugins could be hand-picked to transpile only the features not supported.

Most of the presets I came across before developing this one rely basically on the node version and enable an arbitrary set of plugins. Deciding what to enable based on the version of node is like the old user-agent sniffing technique we all learned to avoid in favor of feature detection.

So, long story short, the solution was to took all official plugins in Babel's babel-preset-latest and enable only those needed because the environment is not supporting a specific feature. In addition, this approach allows the developer to change the version of node/electron and this plugin will update the plugins list accordingly. Nothing is hadrcoded, no magic, no arbitrary decisions!


Are plugins missing? Is there any issue with the feature detection? Let me know by sending a PR or filing an issue!



You can’t perform that action at this time.