Notice
Recent Posts
Recent Comments
07-10 02:17
«   2025/07   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
Archives
Today
Total
관리 메뉴

YESHTML5

tsconfig.json 설정 본문

React,React-Native

tsconfig.json 설정

슬/도/아/밤/ 2022. 1. 18. 17:50
반응형

create-react-app 을 하고나서 config설정파일

 

{
  "compilerOptions": {
    "jsx": "react-native" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */,
    "types": ["react", "react-native", "jest"],
    "target": "esnext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */,
    "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
    "lib": ["es2015", "es2016", "es2017", "es2018", "es2019", "es2020", "dom"] /* Specify library files to be included in the compilation. */,
    "noImplicitReturns": true,
    "noImplicitThis": true,
    "noImplicitAny": false,
    "strictNullChecks": true,
    "downlevelIteration": true,
    "allowJs": true /* Allow javascript files to be compiled. */,
    "declaration": true /* Generates corresponding '.d.ts' file. */,
    "sourceMap": true /* Generates corresponding '.map' file. */,
    "noEmit": true /* Do not emit outputs. */,
    "strict": true /* Enable all strict type-checking options. */,
    "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
    "baseUrl": "." /* Base directory to resolve non-absolute module names. */,
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": true,
    "isolatedModules": true,
    "resolveJsonModule": true,
    "paths": {
      "@app/*": ["src/*"],
      "@components/*": ["src/components/*"],
      "@screens/*": ["src/screens/*"]
    },
    "typeRoots": ["src/types", "node_modules/@types"]
  },
  "include": ["**/*"],
  "exclude": ["node_modules", "babel.config.js", "metro.config.js", "jest.config.js"]
}

 

추후 상단에 import 할때 @app/~~ 

이부부은 추후 index 패턴으로 조금더 가독성있게 하고자한다. 

 

반응형
Comments