yarn add @zvs001/babel-config
List of configurations:
Configuration is based on metro-react-native-babel-preset
Based on core
config
Includes:
- @emotion plugin with auto-pragma
Configuration includes imports optimisations for:
- @mui
- @fortawesome
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",
}
}