From 22d0c56f53234a4f042fda91643d53c5adabf236 Mon Sep 17 00:00:00 2001 From: solderq35 Date: Wed, 3 Apr 2024 14:15:21 -0700 Subject: [PATCH] add comment for reference --- babel.config.js | 9 +++++++++ package.json | 1 + yarn.lock | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/babel.config.js b/babel.config.js index d3fd24ad..0c705bff 100644 --- a/babel.config.js +++ b/babel.config.js @@ -3,7 +3,16 @@ module.exports = function (api) { return { presets: ["babel-preset-expo", "module:metro-react-native-babel-preset"], plugins: [ + // Fix issues with test login script (yarn test), and build cache + // Reference: https://github.com/expo/router/issues/41#issuecomment-1657674119 + [ + "transform-inline-environment-variables", + { + include: ["EXPO_ROUTER_APP_ROOT"], + }, + ], require.resolve("expo-router/babel"), + "@babel/plugin-transform-export-namespace-from", "react-native-paper/babel", "react-native-reanimated/plugin", [ diff --git a/package.json b/package.json index cc37048f..27dda396 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "devDependencies": { "@babel/core": "^7.20.0", "@tanstack/eslint-plugin-query": "^5.20.1", + "babel-plugin-transform-inline-environment-variables": "^0.4.4", "prettier": "3.2.5", "prettier-plugin-organize-imports": "^3.2.4" }, diff --git a/yarn.lock b/yarn.lock index e821eb4a..2eedb787 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3523,6 +3523,11 @@ babel-plugin-transform-flow-enums@^0.0.2: dependencies: "@babel/plugin-syntax-flow" "^7.12.1" +babel-plugin-transform-inline-environment-variables@^0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-inline-environment-variables/-/babel-plugin-transform-inline-environment-variables-0.4.4.tgz#974245008b3cbbd646bd81707af147aea3acca43" + integrity sha512-bJILBtn5a11SmtR2j/3mBOjX4K3weC6cq+NNZ7hG22wCAqpc3qtj/iN7dSe9HDiS46lgp1nHsQgeYrea/RUe+g== + babel-preset-expo@~9.5.2: version "9.5.2" resolved "https://registry.yarnpkg.com/babel-preset-expo/-/babel-preset-expo-9.5.2.tgz#5ed1756c8434ca972d7a940e4f13570a283641df"