diff --git a/boilerplate.js b/boilerplate.js index def58fcc..b74517ba 100644 --- a/boilerplate.js +++ b/boilerplate.js @@ -87,6 +87,7 @@ async function install(context) { // remove the __tests__ directory, App.js, and unnecessary config files that come with React Native const filesToRemove = [ ".babelrc", + "babel.config.js", ".buckconfig", ".eslintrc.js", ".prettierrc.js", @@ -131,7 +132,7 @@ async function install(context) { { template: ".env.example", target: ".env" }, { template: ".prettierignore", target: ".prettierignore" }, { template: ".solidarity", target: ".solidarity" }, - { template: ".babelrc", target: ".babelrc" }, + { template: "babel.config.js", target: "babel.config.js" }, { template: "react-native.config.js", target: "react-native.config.js" }, { template: "tsconfig.json", target: "tsconfig.json" }, { template: "app/app.tsx.ejs", target: "app/app.tsx" }, diff --git a/boilerplate/.babelrc b/boilerplate/.babelrc deleted file mode 100644 index a9e56b24..00000000 --- a/boilerplate/.babelrc +++ /dev/null @@ -1,15 +0,0 @@ -{ - "presets": ["module:metro-react-native-babel-preset", "module:react-native-dotenv"], - "env": { - "production": {} - }, - "plugins": [ - [ - "@babel/plugin-proposal-decorators", - { - "legacy": true - } - ], - ["@babel/plugin-proposal-optional-catch-binding"] - ] -} diff --git a/boilerplate/babel.config.js b/boilerplate/babel.config.js new file mode 100644 index 00000000..d1fbc455 --- /dev/null +++ b/boilerplate/babel.config.js @@ -0,0 +1,15 @@ +module.exports = { + presets: ["module:metro-react-native-babel-preset", "module:react-native-dotenv"], + env: { + production: {} + }, + plugins: [ + [ + "@babel/plugin-proposal-decorators", + { + legacy: true + } + ], + ["@babel/plugin-proposal-optional-catch-binding"] + ] +}