Skip to content
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

Expo50 #325

Merged
merged 12 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .example.env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ SENTRY_PROJECT=
SENTRY_DSN=
SENTRY_AUTH_TOKEN=

EXPO_TOKEN=
EXPO_NO_TELEMETRY=1

NODE_ENV=development
NODE_ENV_SHORT=dev

APP_VARIANT=dev

DEBUG=dev
36 changes: 12 additions & 24 deletions config/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,16 @@ const config: ExpoConfig = {
'expo-localization',
['expo-barcode-scanner', { cameraPermission }],
['expo-camera', { cameraPermission }],
'sentry-expo',
'expo-updates'
'expo-secure-store',
[
'@sentry/react-native/expo',
{
organization: process?.env?.SENTRY_ORG, // || 'sentry org slug, or use the `SENTRY_ORG` environment variable',
project: process?.env?.SENTRY_PROJECT, // || 'sentry project name, or use the `SENTRY_PROJECT` environment variable',
dsn: process?.env?.SENTRY_DSN, // || 'sentry dsn, or use the `SENTRY_DSN` environment variable',
authToken: process?.env?.SENTRY_AUTH_TOKEN, // || 'sentry auth token, or use the `SENTRY_AUTH_TOKEN` environment variable',
}
]
],
ios: {
supportsTablet: false,
Expand All @@ -96,9 +104,6 @@ const config: ExpoConfig = {
},
package: `xyz.elliptica.enuts${!IS_PROD ? `.${_appVariant}` : ''}`
},
web: {
favicon: './assets/favicon.png'
},
extra: {
eas: { projectId: 'edb75ccd-71ac-4934-9147-baf1c7f2b068' },
DEBUG: process?.env?.DEBUG,
Expand All @@ -107,25 +112,8 @@ const config: ExpoConfig = {
NODE_ENV_SHORT: _nodeEnvShort,
SENTRY_DSN: process?.env?.SENTRY_DSN,
SENTRY_ORG: process?.env?.SENTRY_ORG,
SENTRY_PROJECT: process?.env?.SENTRY_PROJECT
},
hooks: {
postPublish: [
{
file: 'sentry-expo/upload-sourcemaps',
config: {
organization: process?.env?.SENTRY_ORG,
project: process?.env?.SENTRY_PROJECT
}
}
]
},
updates: {
enabled: false,
url: 'https://u.expo.dev/edb75ccd-71ac-4934-9147-baf1c7f2b068'
},
runtimeVersion: {
policy: 'sdkVersion'
SENTRY_PROJECT: process?.env?.SENTRY_PROJECT,
SENTRY_AUTH_TOKEN: process?.env?.SENTRY_AUTH_TOKEN
}
}

Expand Down
10 changes: 6 additions & 4 deletions config/metro.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
// Learn more https://docs.expo.io/guides/customizing-metro
// https://docs.expo.dev/guides/using-sentry/#update-metro-configuration

import { getDefaultConfig } from '@expo/metro-config'
// This replaces `const { getDefaultConfig } = require('expo/metro-config');`
import { getSentryExpoConfig } from '@sentry/react-native/metro'
import { readdirSync } from 'fs'
// import { mergeConfig } from 'metro-config'
import { join, resolve } from 'path'


const root = resolve(join(__dirname, '..', ''))
const assertDir = resolve(join(root, 'assets'))

export const config = getDefaultConfig(root)
// This replaces const config = getDefaultConfig(root)
export const config = getSentryExpoConfig(root)

const assetExts = [...new Set([
...config?.resolver?.assetExts ?? [],
Expand All @@ -19,4 +22,3 @@ const assetExts = [...new Set([
])]
if (config.resolver?.assetExts) { config.resolver.assetExts = assetExts }

// config mergeConfig(config, { resolver: { ...config.resolver, assetExts } })
Loading
Loading