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

Publish source maps and declaration maps #204

Closed
felixfbecker opened this issue Dec 19, 2018 · 4 comments
Closed

Publish source maps and declaration maps #204

felixfbecker opened this issue Dec 19, 2018 · 4 comments

Comments

@felixfbecker
Copy link
Contributor

Enabling sourceMap allows stepping into comlink code when debugging and to have stack traces that point to the real source, if the source is also included in the npm package either as files or inline in the source map.
declarationMap in tsconfig.json allows tools to map the .d.ts files back to the source, which for example allows cross-repository go-to-definition and find-all-references on sourcegraph.com.

This is currently difficult to add because the package.json is copied into dist/, and TypeScript would then point to ../comlink.ts as the source, which doesn't exist because .. would be node_modules. Why not publish the package root? Comlink is just a single file so it's always imported through the main import anyway.

@surma
Copy link
Collaborator

surma commented Jan 28, 2019

I should consider just publishing the entire root. It’ll be a breaking change, but I’ll look into it for the next release.

@felixfbecker
Copy link
Contributor Author

I agree. Should be non-breaking since comlink only has a single file that is the main/types field, which will continue to work with the same imports if just pointed to the files in dist/

@surma
Copy link
Collaborator

surma commented Mar 11, 2019

The next major of Comlink is doing this a lot better, I think. It‘s on the v4 branch and released to npm under comlink@next. Please take a look :)

@surma
Copy link
Collaborator

surma commented Jun 13, 2019

Closing this as v4 is now live!

@surma surma closed this as completed Jun 13, 2019
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

No branches or pull requests

2 participants