Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don’t publish sourcemaps #2866

Closed
jkwlui opened this issue Sep 27, 2018 · 0 comments
Closed

Don’t publish sourcemaps #2866

jkwlui opened this issue Sep 27, 2018 · 0 comments
Assignees
Labels
type: cleanup An internal cleanup or hygiene concern.

Comments

@jkwlui
Copy link
Member

jkwlui commented Sep 27, 2018

About

Source maps to google typescript source are shipped with npm publish into installable tarballs.

When a user runs code in an environment that enables source maps their stack traces end in code that doesn't exist.

This creates a very difficult situation for common types of user debugging. For example, inserting a console.log in the javascript to find out why an interaction with a google library failing.

There is no reasonable way for end users to map typescript lines to javascript lines. Reverse source maps are not available as far as I know.

Implementation

In the package.json files array. Replace "build/src" with "build/src/!(*.map)":

"files": [
  "build/src/!(*.map)"
  ...
]
@jkwlui jkwlui self-assigned this Sep 27, 2018
@JustinBeckwith JustinBeckwith added the type: cleanup An internal cleanup or hygiene concern. label Sep 27, 2018
@jkwlui jkwlui closed this as completed Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

No branches or pull requests

2 participants