forked from Yegorich555/webpack-must-have
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbabel.config.js
More file actions
18 lines (18 loc) · 708 Bytes
/
babel.config.js
File metadata and controls
18 lines (18 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
module.exports = {
presets: [
"@babel/preset-react", // optional: react: this resolves react-files (jsx, tsx)
"@babel/preset-typescript", // allows to use TypeScript
[
"@babel/preset-env", // compiles your js according with .browserslistrc
{
// requires for pollyfills: https://babeljs.io/docs/en/babel-preset-env#usebuiltins-usage
useBuiltIns: "usage",
corejs: { version: 3 },
},
],
],
plugins: [
"@babel/plugin-proposal-class-properties", // transforms static class properties as well as properties declared with the property initializer syntax
"jsx-classnames-advanced", // optional: react: this resolves className={object}
],
};