mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 00:09:23 +02:00
[GH-ISSUE #2] Published npm package ships sourcemaps pointing to missing source files #2
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @threepointone on GitHub (Feb 24, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/2
Description
When vinext is installed from npm (
vinext@0.0.1), Vite logs many warnings during dev:Cause
The published
dist/directory includes.js.mapfiles that reference the original TypeScript source files (via"sources"in the sourcemap JSON). However, the source.tsfiles are not included in the npm package, so Vite cannot resolve the sourcemap references.This wasn't visible when using vinext as a linked dependency because symlinked packages resolve to the actual source tree where the
.tsfiles exist.Suggested fix
Either:
"src"to the"files"field inpackage.json(enables proper source-mapped debugging)"sourcesContent"in the sourcemaps so the source content is inlined into the.js.mapfiles (no separate source files needed).js.mapfiles and//# sourceMappingURLcomments from.jsfiles)Option 2 is the best balance — consumers get working sourcemaps for debugging without needing the raw source tree.
Impact
Harmless — these are warnings, not errors. The app runs fine. But it's noisy and clutters the terminal during development.