Skip to content

tsconfig v0.5 regression with json imports #27

@cexbrayat

Description

@cexbrayat

Let's say a file contains a JSON import:

import en from '@/locales/en.json';

then the type-check throws with:

src/i18n.ts:2:16 - error TS6307: File '/home/projects/github-nzwcnu/src/locales/en.json' is not listed within the file list of project '/home/projects/github-nzwcnu/tsconfig.vitest.json'. Projects must list all files or use an 'include' pattern.

2 import en from '@/locales/en.json';

Reverting to v0.4 makes the error go away.

See https://stackblitz.com/edit/github-nzwcnu?file=src%2Fi18n.ts for a small repro
Run npm i and npm run type-check

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions