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

Missing "sourcesContent" in source map #395

Closed
zengguirong opened this issue Nov 5, 2021 · 1 comment
Closed

Missing "sourcesContent" in source map #395

zengguirong opened this issue Nov 5, 2021 · 1 comment

Comments

@zengguirong
Copy link
Contributor

zengguirong commented Nov 5, 2021

In the source map file, I found the sources field that is pointing to the source location (such as https://cdn.jsdelivr.net/npm/ky@0.28.6/distribution/index.js.map). But the source folder is not inclued in the published package.
When using some esm bundlers such as Vite, the dev server could not find the source file and finally response error with code 404.
There is 2 resolution:

  1. Set the inlineSources option to true in tsconfig.dist.json
  2. Add source to the files field in package.json
@sindresorhus
Copy link
Owner

Fixed by #396

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