Skip to content

TS6307: JSON files not in file list when using composite projects #905

@thovden

Description

@thovden

Expected Behaviour

Using resolveJsonModule and composite projects works as tsc does.

Note that tsc has had some issues with this that were solved in microsoft/TypeScript#25636 and that tsc works correctly now. See reproduction below.

Actual Behaviour

ERROR in ./tsloader-ts6307/tsconfig.composite.json
[tsl] ERROR
      TS6307: File 'tsloader-ts6307/src/test.json' is not in project file list. Projects must list all files or use an 'include' pattern.

Steps to Reproduce the Problem

$  git clone [email protected]:thovden/tsloader-ts6307.git
$ cd tsloader-ts6307/
$ npm i

# tsc works well for the composite config
$ npm run tsc

# webpack + ts-loader works without composite set
$ npm run works
[./src/test.json] 20 bytes {main} [built]
    + 12 hidden modules
ℹ 「wdm」: Compiled successfully.

# webpack + ts-loader fails with composite
$ npm run fails
ERROR in ts6307/tsconfig.fail.json
[tsl] ERROR
      TS6307: File 'ts6307/src/test.json' is not in project file list. Projects must list all files or use an 'include' pattern.
ℹ 「wdm」: Failed to compile.

Location of a Minimal Repository that Demonstrates the Issue.

https://github.com/thovden/tsloader-ts6307

Metadata

Metadata

Assignees

Labels

pinneddon't let probot-stale close

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions