@zvs001/babel-config

4.0.0 • Public • Published

Install

yarn add @zvs001/babel-config

List of configurations:

core

Configuration is based on metro-react-native-babel-preset

react

Based on core config

Includes:

  • @emotion plugin with auto-pragma

Configuration includes imports optimisations for:

  • @mui
  • @fortawesome

Example

Update .babelrc:

{
  "extends": "@zvs001/babel-config/react",
  "sourceRoot": ".",
  "plugins": [
    [
      "module-resolver",
      {
        "extensions": [".js", ".ts", ".tsx"],
        "alias": {
          "@reducers": "./src/reducers/"
        }
      }
    ]
  ]
}

To make typescript to properly work with pragma-auto? add next update to tsconfig.json:

{
  "compilerOptions": {
    "jsx": "react-jsx",
    "jsxImportSource": "@emotion/react",
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @zvs001/babel-config

Weekly Downloads

4

Version

4.0.0

License

ISC

Unpacked Size

2.19 kB

Total Files

6

Last publish

Collaborators

  • zvs001