-
-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(expo) : Update to Expo 50 #795
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
4c9c269
chore: update to Expo 50
VaniaPopovic c4be4aa
fix: revert change in settings.json
VaniaPopovic 3abb0f3
chore(expo): update expo to latest stable
VaniaPopovic e332d80
chore(expo): update expo to latest stable
VaniaPopovic cd47aa2
chore(expo): update expo to latest stable
VaniaPopovic 759459f
Merge branch 'main' into VaniaPopovic/main
juliusmarminge 6a10316
update more stuff, remove expo tsconfig
juliusmarminge aae6e9c
Merge branch 'main' into VaniaPopovic/main
juliusmarminge c7dcc41
Merge branch 'main' into VaniaPopovic/main
juliusmarminge b283a38
add transistive deps to auth-proxy
juliusmarminge 95be156
fix drizzle transistive dep
juliusmarminge aab72d6
fix transistive deps for ui pacakge
juliusmarminge dbc1f1c
downgrade auth
juliusmarminge a069ae1
chore(expo): fix styles for expo app and enable dark/light mode
VaniaPopovic 8c23e75
fix(expo): Remove unused import
VaniaPopovic c13d231
fix(expo): Remove theme useEffect as it is not needed
VaniaPopovic 6cb3490
split tw
juliusmarminge f78b5f2
fix import
juliusmarminge edd9462
nitpick glob
juliusmarminge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
/** @type {import("@babel/core").ConfigFunction} */ | ||
module.exports = function (api) { | ||
api.cache.forever(); | ||
|
||
api.cache(true); | ||
return { | ||
presets: [ | ||
["babel-preset-expo", { jsxImportSource: "nativewind" }], | ||
"nativewind/babel", | ||
], | ||
plugins: [ | ||
require.resolve("expo-router/babel"), | ||
require.resolve("react-native-reanimated/plugin"), | ||
], | ||
plugins: ["react-native-reanimated/plugin"], | ||
}; | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,55 @@ | ||
// Learn more: https://docs.expo.dev/guides/monorepos/ | ||
const { getDefaultConfig } = require("@expo/metro-config"); | ||
const { getDefaultConfig } = require("expo/metro-config"); | ||
const { FileStore } = require("metro-cache"); | ||
const { withNativeWind } = require("nativewind/metro"); | ||
|
||
const path = require("path"); | ||
|
||
const projectRoot = __dirname; | ||
const workspaceRoot = path.resolve(projectRoot, "../.."); | ||
module.exports = withTurborepoManagedCache( | ||
withMonorepoPaths( | ||
withNativeWind(getDefaultConfig(__dirname), { | ||
input: "./src/styles.css", | ||
configPath: "./tailwind.config.ts", | ||
}), | ||
), | ||
); | ||
|
||
// Create the default Metro config | ||
const config = getDefaultConfig(projectRoot, { isCSSEnabled: true }); | ||
/** | ||
* Add the monorepo paths to the Metro config. | ||
* This allows Metro to resolve modules from the monorepo. | ||
* | ||
* @see https://docs.expo.dev/guides/monorepos/#modify-the-metro-config | ||
* @param {import('expo/metro-config').MetroConfig} config | ||
* @returns {import('expo/metro-config').MetroConfig} | ||
*/ | ||
function withMonorepoPaths(config) { | ||
const projectRoot = __dirname; | ||
const workspaceRoot = path.resolve(projectRoot, "../.."); | ||
|
||
if (config.resolver) { | ||
// 1. Watch all files within the monorepo | ||
// #1 - Watch all files in the monorepo | ||
config.watchFolders = [workspaceRoot]; | ||
// 2. Let Metro know where to resolve packages and in what order | ||
|
||
// #2 - Resolve modules within the project's `node_modules` first, then all monorepo modules | ||
config.resolver.nodeModulesPaths = [ | ||
path.resolve(projectRoot, "node_modules"), | ||
path.resolve(workspaceRoot, "node_modules"), | ||
]; | ||
// 3. Force Metro to resolve (sub)dependencies only from the `nodeModulesPaths` | ||
config.resolver.disableHierarchicalLookup = true; | ||
|
||
return config; | ||
} | ||
|
||
// @ts-expect-error - FIXME: type is mismatching? | ||
module.exports = withNativeWind(config, { | ||
input: "./src/styles.css", | ||
configPath: "./tailwind.config.ts", | ||
}); | ||
/** | ||
* Move the Metro cache to the `node_modules/.cache/metro` folder. | ||
* This repository configured Turborepo to use this cache location as well. | ||
* If you have any environment variables, you can configure Turborepo to invalidate it when needed. | ||
* | ||
* @see https://turbo.build/repo/docs/reference/configuration#env | ||
* @param {import('expo/metro-config').MetroConfig} config | ||
* @returns {import('expo/metro-config').MetroConfig} | ||
*/ | ||
function withTurborepoManagedCache(config) { | ||
config.cacheStores = [ | ||
new FileStore({ root: path.join(__dirname, "node_modules/.cache/metro") }), | ||
]; | ||
return config; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should work according to their docs? did they go back?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should work fine. We did discover an issue in
expo/AppEntry
where we try to import../../App
, which doesn't work for.pnpm/expo@.../node_modules/expo/AppEntry.js
.We know about that issue, and will fix it as soon as we can!