Skip to content

Commit

Permalink
Merge pull request #40 from mym0404/expo-config-plugin-update
Browse files Browse the repository at this point in the history
Import expo config plugin from expo package not standalone package
  • Loading branch information
mym0404 committed Jul 5, 2024
2 parents 7ca0545 + f2c9505 commit 100237f
Show file tree
Hide file tree
Showing 5 changed files with 382 additions and 64 deletions.
3 changes: 2 additions & 1 deletion packages/core/expo-config-plugin/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { type ConfigPlugin, createRunOncePlugin } from '@expo/config-plugins';
import type { ConfigPlugin } from 'expo/config-plugins';
import { createRunOncePlugin } from 'expo/config-plugins';

import type { KakaoAndroidConfig, KakaoIosConfig } from './type';
import { withAndroid } from './withAndroid';
Expand Down
8 changes: 4 additions & 4 deletions packages/core/expo-config-plugin/src/withAndroid.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AndroidConfig, type ConfigPlugin, withAndroidManifest } from '@expo/config-plugins';
import type { ManifestActivity } from '@expo/config-plugins/build/android/Manifest';
import type { ConfigPlugin } from 'expo/config-plugins';
import { AndroidConfig, withAndroidManifest } from 'expo/config-plugins';

import type { KakaoAndroidConfig } from './type';

Expand All @@ -20,7 +20,7 @@ const withAndroid: ConfigPlugin<{
config = withAndroidManifest(config, (config) => {
const mainApplication = AndroidConfig.Manifest.getMainApplicationOrThrow(config.modResults);

mainApplication.activity?.push(<ManifestActivity>{
mainApplication.activity?.push(<AndroidConfig.Manifest.ManifestActivity>{
$: {},
});

Expand All @@ -29,7 +29,7 @@ const withAndroid: ConfigPlugin<{
activity,
}: {
activityName: string;
activity: ManifestActivity;
activity: AndroidConfig.Manifest.ManifestActivity;
}) => {
mainApplication.activity = [
...(mainApplication.activity || []).filter(
Expand Down
2 changes: 1 addition & 1 deletion packages/core/expo-config-plugin/src/withIos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
WarningAggregator,
withAppDelegate,
withInfoPlist,
} from '@expo/config-plugins';
} from 'expo/config-plugins';

import type { KakaoIosConfig } from './type';

Expand Down
8 changes: 7 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,27 @@
"access": "public"
},
"devDependencies": {
"@expo/config-plugins": "7.8.4",
"@types/crypto-js": "^4",
"@types/jest": "^29.5.5",
"@types/react": "^18.2.44",
"del-cli": "^5.1.0",
"expo": "^51.0.18",
"jest": "^29.7.0",
"react": "18.2.0",
"react-native": "0.74.0",
"react-native-builder-bob": "^0.20.0",
"typescript": "5.1.6"
},
"peerDependencies": {
"expo": ">=47.0.0",
"react": "*",
"react-native": "*"
},
"peerDependenciesMeta": {
"expo": {
"optional": true
}
},
"workspaces": [
"example",
"packages/*"
Expand Down
Loading

0 comments on commit 100237f

Please sign in to comment.