강의

멘토링

커뮤니티

Inflearn コミュニティ Q&A

jaehong27821141 のプロフィール画像
jaehong27821141

投稿した質問数

実務に直接適用するストーリーブックとUIテスト

Labelコンポーネントとストーリーのmetadataの紹介

tsconfig

作成

·

177

0

스크린샷 2024-10-19 오후 4.17.47.png

meta 객체의 프로퍼티에서 tsconfig.json에 포함되어 있지 않습니다. 라고 에러가 뜨는데 어떤 설정을 해주어야할까요?

tsconfig.json

{
  "files": [],
  "references": [
    { "path": "./tsconfig.app.json" },
    { "path": "./tsconfig.node.json" }
  ]
}

tsconfig.app.json

{
  "compilerOptions": {
    "target": "ES2020",
    "useDefineForClassFields": true,
    "lib": ["ES2020", "DOM", "DOM.Iterable"],
    "module": "ESNext",
    "skipLibCheck": true,

    /* Bundler mode */
    "moduleResolution": "bundler",
    "allowImportingTsExtensions": true,
    "isolatedModules": true,
    "moduleDetection": "force",
    "noEmit": true,
    "jsx": "react-jsx",

    /* Linting */
    "strict": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "noFallthroughCasesInSwitch": true,
  },

  "include": ["src"]
}

 

tsconfig.node.json

{
  "compilerOptions": {
    "target": "ES2022",
    "lib": ["ES2023"],
    "module": "ESNext",
    "skipLibCheck": true,

    /* Bundler mode */
    "moduleResolution": "bundler",
    "allowImportingTsExtensions": true,
    "isolatedModules": true,
    "moduleDetection": "force",
    "noEmit": true,

    /* Linting */
    "strict": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "noFallthroughCasesInSwitch": true,
  },
  "include": ["vite.config.ts"]
}


 

 

reacttypescripttailwind-cssstorybookui-testing

回答 1

0

jasonkang님의 프로필 이미지
jasonkang
インストラクター

tsconfig.json에서 include에 아래 항목들을 추가해보시겠어요?

"include": [
    "src/**/*.stories.ts",
    "src/**/*.stories.tsx"
  ]
jaehong27821141 のプロフィール画像
jaehong27821141

投稿した質問数

質問する