microsoft / microsoft/TypeScript
TypeScript refuses to emit files from node_modules with getEmitOutput()
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
Hi. In out company we use workflow when all packages are written in pure TypeScript and we publish and consume them as-is, without any pre-compilation. I know that it's slower, but it's very convenient for developers, because they don't need to run several parallel tsc --watch processes.
We used webpack and awesome-typescript-loader for this and everything worked fine. But I see that now TypeScript refuses to emit files from node_modules directory using getEmitOutput(), because of isSourceFileFromExternalLibrary check here.
Can we make this configurable?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with getEmitOutput() and the isSourceFileFromExternalLibrary check in src/compiler/utilities.ts, as identified in the issue. Compare the current behavior with the reported webpack and awesome-typescript-loader workflow. Done means determining and implementing a configurable way to emit files from node_modules, with tests covering the requested behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, webpack
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100