> For the complete documentation index, see [llms.txt](https://gpeterhand.gitbook.io/react/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gpeterhand.gitbook.io/react/sborka-proekta-1/babel.md).

# Babel

Устанавливаем [Babel](https://babeljs.io/): лоадер и пресеты

> yarn add  babel-loader @babel/core  @babel/preset-env  @babel/preset-react

Создаем файл **.babelrc**

```
{
  "presets": ["@babel/preset-env", "@babel/preset-react"]
}
```

Создаем файл **webpack.config.js**

```jsx
const webpack = require('webpack');
module.exports = {
  module: {
    rules: [
      {
        test: /\.js$/,
        exclude: /node_modules/,
        use: 'babel-loader'
      }
    ]
  }
};
```
