fix(package): Don't publish source maps #508
Merged
+12
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The root
tsconfig.json
file asks for source maps to be generated. If we ship these with the published packages, they will point at the.ts
files in the relative directory, which aren't shipped with the packages. This makes the source maps useless for debugging, and a source of errors otherwise.I originally wanted to adopt the approach from
entities
, where I used thesourceRoot
field to point to the original source files on GitHub (fb55/entities#788). Unfortunately, this doesn't work withtsc --build
(microsoft/TypeScript#25613) and would require a work-around1.Footnotes
Something along the lines of defining a source root in each package's
tsconfig.json
, then updating all of them to point to a specific commit in ased
script. ↩