microsoft / microsoft/TypeScript
Include sourcemaps in Typescript NPM package.
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
Search Terms
typescript.js.map typescript.js source map
Suggestion
I would like typescript.js.map to be included in the distributed NPM package, along with the original sources. This could be achieved either with inlineSources: true or by including the src folder in the NPM package.
Use Cases
I'm working on a compiler transformer and this has resulted in me stepping through typescript.js. Since source maps are not included, this results in me stepping through a 125,000 line JavaScript file. Not only does my editor hate me for this and sometimes locks up, the code is significantly harder to read than the original TypeScript source code.
Checklist
My suggestion meets these guidelines:
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
- This feature would agree with the rest of TypeScript's Design Goals.
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
The issue names no specific files or tests. Start by locating the NPM packaging or build entry point that produces typescript.js, then verify the packed artifact contains typescript.js.map and its original sources, using the inlineSources or src-folder alternatives as the acceptance criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system, release
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100