You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Published npm package ships sourcemaps pointing to missing source files #2
When vinext is installed from npm (vinext@0.0.1), Vite logs many warnings during dev:
Sourcemap for ".../node_modules/vinext/dist/server/image-optimization.js" points to missing source files
Sourcemap for ".../node_modules/vinext/dist/server/app-router-entry.js" points to missing source files
Sourcemap for ".../node_modules/vinext/dist/shims/navigation.js" points to missing source files
Sourcemap for ".../node_modules/vinext/dist/shims/headers.js" points to missing source files
Sourcemap for ".../node_modules/vinext/dist/shims/server.js" points to missing source files
Sourcemap for ".../node_modules/vinext/dist/shims/metadata.js" points to missing source files
Sourcemap for ".../node_modules/vinext/dist/shims/cache.js" points to missing source files
Sourcemap for ".../node_modules/vinext/dist/utils/hash.js" points to missing source files
Sourcemap for ".../node_modules/vinext/dist/shims/fetch-cache.js" points to missing source files
Sourcemap for ".../node_modules/vinext/dist/shims/cache-runtime.js" points to missing source files
Sourcemap for ".../node_modules/vinext/dist/shims/navigation-state.js" points to missing source files
Sourcemap for ".../node_modules/vinext/dist/server/instrumentation.js" points to missing source files
Sourcemap for ".../node_modules/vinext/dist/shims/font-local.js" points to missing source files
Cause
The published dist/ directory includes .js.map files that reference the original TypeScript source files (via "sources" in the sourcemap JSON). However, the source .ts files 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 .ts files exist.
Suggested fix
Either:
Include source files in the npm package by adding "src" to the "files" field in package.json (enables proper source-mapped debugging)
Set "sourcesContent" in the sourcemaps so the source content is inlined into the .js.map files (no separate source files needed)
Strip sourcemaps from the published package if they are not needed by consumers (remove .js.map files and //# sourceMappingURL comments from .js files)
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.
Activity
fix: inline source content in sourcemaps to prevent missing source wa…
fix: useSelectedLayoutSegment(s) returns layout-relative segments
fix: export Space_Grotesk from next/font/google (cloudflare#190)
fix: address 6 bugs found in code review
fix: address 6 bugs found in code review
fix: 9 self-review bugs in static prerender build
fix(basepath): enforce scoping on rewrites/redirects/routes (#1397)
fix(otel-tracer-extension): address bonk review findings
fix(app-router): extend OTel tracer provider for Cache Component span…