Using Babel
How to use Babel with your tool of choice.
1Choose your tool (try CLI)
Prototyping
Babel built-ins
Build systems
Frameworks
Test frameworks
Utilities
Language APIs
Template engines
Editors and IDEs
Debuggers
2Installation
3Usage
4Create babel.config.json
configuration file
Great! You've configured Babel but you haven't made it actually do anything. Create a babel.config.json config in your project root and enable some presets.
To start, you can use the env preset, which enables transforms for ES2015+
npm install @babel/preset-env --save-dev
In order to enable the preset you have to define it in your babel.config.json
file, like this:
{
"presets": ["@babel/preset-env"]
}