Utilizzo di Babel
Come utilizzare Babel con lo strumento di tua scelta.
1Scegli il tuo strumento (prova la CLI)
Prototyping
Babel built-ins
Build systems
Frameworks
Test frameworks
Utilities
Language APIs
Template engines
Editors and IDEs
Debuggers
2Installazione
3Utilizzo
4Crea babel.config.json file di configurazione
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"]
}