Adding Babel
Explore how to install Babel and its necessary plugins to convert React and TypeScript code to JavaScript. Understand the Babel configuration using .babelrc to ensure smooth project setup before adding linting and formatting.
We'll cover the following...
We'll cover the following...
Installing Babel
As mentioned in the last lesson, our project is going to use Babel to convert our React and TypeScript code to JavaScript. Let’s install Babel with the necessary plugins as a development dependency:
npm install --save-dev @babel/core @babel/preset-env @babel/preset-react @babel/preset-typescript ...