RN: 절대경로 설정

Lumpen·2024년 8월 18일
0

ReactNative

목록 보기
40/49

tsconfig.json

{
  "extends": "@react-native/typescript-config/tsconfig.json",
  "compilerOptions": {
    "strict": true,
    "skipLibCheck": true,
    "baseUrl": "./src",
    "paths": {
      "~/*": ["./*"]
    }
  }
}

babel.config.js

module.exports = {
  presets: ['module:@react-native/babel-preset'],
  plugins: [
    'react-native-reanimated/plugin',
    [
      'module-resolver',
      {
        root: ['.'],
        extensions: [
          '.ios.ts',
          '.android.ts',
          '.ts',
          '.ios.tsx',
          '.android.tsx',
          '.tsx',
          '.jsx',
          '.js',
          '.json',
        ],
        alias: {
          '~': './src',
        },
      },
    ],
  ],
};
profile
떠돌이 생활을 하는. 실업자, 부랑 생활을 하는

0개의 댓글