Presets

A Preset is a group of plugins used to support particular language features
link - babeljs.io/docs/en/presets


@babel/preset-env
This will transpile all ES 2015 features to ES 2009 - CREATES MORE PROBLEMS

npm install --save-dev @babel/preset-env 

includes: plugin-transform-arrow-functions
includes: plugin-transform-classes
includes: babel-preset-es2015
includes: babel-preset-es2016
includes: babel-preset-es2017
does not include everything in "plugin-proposal-class-properties"



@babel/preset-typescript
This lets you compile typescript.

npm install --save-dev @babel/preset-typescript 

@babel/preset-react
This lets you compile JSX into regular Javascript.

npm install --save-dev @babel/preset-react 




© 2021 Better Solutions Limited. All Rights Reserved. © 2021 Better Solutions Limited TopPrevNext