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

fix(package): Don't publish source maps #508

Merged
merged 1 commit into from
Apr 20, 2022
Merged

fix(package): Don't publish source maps #508

merged 1 commit into from
Apr 20, 2022

Conversation

fb55
Copy link
Collaborator

@fb55 fb55 commented Apr 20, 2022

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 the sourceRoot field to point to the original source files on GitHub (fb55/entities#788). Unfortunately, this doesn't work with tsc --build (microsoft/TypeScript#25613) and would require a work-around1.

Footnotes

  1. 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 a sed script.

@fb55 fb55 requested review from 43081j and wooorm April 20, 2022 08:47
@fb55 fb55 merged commit 8168960 into master Apr 20, 2022
@fb55 fb55 deleted the ignore-source-maps branch April 20, 2022 09:52
fb55 added a commit that referenced this pull request Apr 20, 2022
#508 didn't work as expected; this adds an `.npmignore` file that excludes all unwanted files.
@fb55 fb55 mentioned this pull request Apr 20, 2022
jmbpwtw pushed a commit to jmbpwtw/parse5 that referenced this pull request Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants