Skip to content

Instantly share code, notes, and snippets.

@ksugawara61
Last active February 14, 2024 23:37
Show Gist options
  • Save ksugawara61/ba1384cc39740570b035321dde9e62bd to your computer and use it in GitHub Desktop.
Save ksugawara61/ba1384cc39740570b035321dde9e62bd to your computer and use it in GitHub Desktop.
bunでReact Native expo環境を作る

bunでReact Native expo環境を作る

https://docs.expo.dev/guides/using-bun/ に従い expo を作成

$ bun create expo expo-sandbox

https://docs.expo.dev/guides/typescript/ の In an existing project に従いtypescript環境を追加する

パッケージを追加

$ bun add -d typescript @react-native/typescript-config jest @types/react -y

tyconfig.json は以下の感じ

{
  "extends": "@react-native/typescript-config/tsconfig.json",
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/*": ["src/*"]
    }
  },
  "include": ["App.tsx", "src/**/*.{ts,tsx}"]
}

package.json に以下を追加

  ...
  "scripts": {
    ...
    "typecheck": "tsc --noEmit"
  },
  ...

iOSシミュレータを起動して bun run ios を実行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment