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

Add Source Map to Package #1299

Closed
sm-fm opened this issue Apr 25, 2024 · 2 comments · Fixed by #1396
Closed

Add Source Map to Package #1299

sm-fm opened this issue Apr 25, 2024 · 2 comments · Fixed by #1396
Assignees
Labels
lib/javascript JavaScript client library

Comments

@sm-fm
Copy link

sm-fm commented Apr 25, 2024

Bug Report

Version

svix 1.21.0
svix-react 1.11.0

Platform

Description

The source maps need to added to the package. I currently have 157 warnings whenever I build my client because of the lack of source mapping. I've seen other people bring up this issue as well.

I know I can turn source mapping off, but that makes debugging in production more difficult.

Please update the package to contain the source maps so these warnings will go away.

@tasn
Copy link
Member

tasn commented Aug 1, 2024

Whoops, sorry about that. Also sorry for missing this ticket. Will take a look asap!

@tasn tasn added javascript Pull requests that update Javascript code lib/javascript JavaScript client library and removed javascript Pull requests that update Javascript code labels Aug 1, 2024
@svix-lucho svix-lucho self-assigned this Aug 7, 2024
@svix-lucho
Copy link
Contributor

I think the reason why you're seeing such warnings is that in svix we are publishing the package with sourceMaps but without the corresponding TS files. I'll send a PR to publish src as well as dist, so the TS files are in the location pointed by the source maps.

svix-react does not publish sourceMaps (yet), so it shouldn't have the same issue.

svix-lucho added a commit that referenced this issue Aug 7, 2024
## Motivation
We export source maps with the `svix` javascript package, but not the
corresponding source files.

Something like
`{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[].....`
in `index.js.map` throws an error since `../src/index.ts` can't be
found. This causes several warnings in certain bundlers.
 
## Solution
Add the source files to the files published to npm. 

Closes #1299
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib/javascript JavaScript client library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants