TypeStrong / TypeStrong/ts-loader

error when using passThrough

Open
#1,658 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
3.5k
Forks
439
Avg merge
17h 17m
Merged PRs (30d)
2

Description

when using the passThrough options I would expect the tsc command arguments to not comport the list of files to compile otherwise the tsc command produce this error:
error TS5042: Option 'project' cannot be mixed with source files on a command line.

Expected Behaviour

/path/to/tsc --project /path/to/tsconfig.json

Actual Behaviour

Actually the command adds the list of files first
/path/to/tsc file1.ts file2.ts --project /path/to/tsconfig.json

Steps to Reproduce the Problem

here's the config I use in gruntfile:
editor: { tsconfig: { tsconfig: path.normalize(path.resolve('./tsconfig.json')), passThrough: true },

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the passThrough option is handled for the tsconfig editor configuration and how the tsc command arguments are assembled. Reproduce the reported TS5042 error with the shown tsconfig and passThrough settings, then verify that project-only invocation no longer includes source files.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, webpack
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.