Environment
- OS: macOS Catalina
- React Native: 0.63
- npx: 6.14.5
- node: 12.12.0
Description
When trying to setup Haul in an existing project, the haul init command gets stuck at the second step (updating Babel config). I believe this may be due to my project using the JSON version of the config via babel.config.json.
Here's the content of my Babel configuration file:
{
"presets": [
"module:metro-react-native-babel-preset"
],
"plugins": [
[
"module-resolver",
{
"root": [
"./src"
],
"extensions": [
".ios.ts",
".android.ts",
".ts",
".ios.tsx",
".android.tsx",
".tsx",
".jsx",
".js",
".json"
],
"alias": {
"@assets": "./src/assets",
"@components": "./src/components",
"@contexts": "./src/contexts",
"@env": "./src/env",
"@hooks": "./src/hooks",
"@layout": "./src/layout",
"@lib": "./src/lib",
"@localization": "./src/localization",
"@models": "./src/models",
"@navigation": "./src/navigation",
"@network": "./src/network",
"@primitives": "./src/primitives",
"@screens": "./src/screens",
"@scripts": "./src/scripts"
}
}
]
]
}
Reproducible Demo
Create a new React Native app by using react-native init and instead of using the conventional babel.config.js, replace it with babel.config.json.
Environment
Description
When trying to setup Haul in an existing project, the
haul initcommand gets stuck at the second step (updating Babel config). I believe this may be due to my project using the JSON version of the config viababel.config.json.Here's the content of my Babel configuration file:
{ "presets": [ "module:metro-react-native-babel-preset" ], "plugins": [ [ "module-resolver", { "root": [ "./src" ], "extensions": [ ".ios.ts", ".android.ts", ".ts", ".ios.tsx", ".android.tsx", ".tsx", ".jsx", ".js", ".json" ], "alias": { "@assets": "./src/assets", "@components": "./src/components", "@contexts": "./src/contexts", "@env": "./src/env", "@hooks": "./src/hooks", "@layout": "./src/layout", "@lib": "./src/lib", "@localization": "./src/localization", "@models": "./src/models", "@navigation": "./src/navigation", "@network": "./src/network", "@primitives": "./src/primitives", "@screens": "./src/screens", "@scripts": "./src/scripts" } } ] ] }Reproducible Demo
Create a new React Native app by using
react-native initand instead of using the conventionalbabel.config.js, replace it withbabel.config.json.