4 Commits

Author SHA1 Message Date
Divanshu Chauhan (divkix) 2c852d13fc fix: replace relative shim imports with bare specifier vinext/shims/X (#1001) (#1006)
* fix: replace relative shim imports with bare specifier vinext/shims/X (#1001)

Internally, server modules imported their own 'use client' shims via
relative paths (e.g. from "../shims/slot.js"). @vitejs/plugin-rsc's
packageSources tracking only fires for bare specifier imports, so
relative shim imports took a broken fallback path generating absolute
filesystem paths that fail against the package's exports field.

Changes:
- 67 relative shim imports across 34 source files rewritten to
  "vinext/shims/<name>"
- Added .tsconfig paths mapping so TypeScript resolves shim types to
  source (avoids type mismatch between dist and source module graphs)
- Added vitest project-level resolve aliases for vinext/shims -> source
  (prevents separate module graph instances in unit tests)
- Added package.json exports for ./dist/shims/*.js as a safety net
- Added regression test (tests/shim-imports.test.ts) that asserts no
  relative shim imports exist in source

* fix: address review feedback for relative shim imports (#1006)

- Convert missed side-effect import in dev-server.ts to vinext/shims/router-state
- Extend regression test regex to catch bare side-effect import statements
- Remove redundant ./dist/shims/*.js exports from package.json

* replace test with oxlint plugin

---------

Co-authored-by: James <james@eli.cx>
2026-05-02 16:32:53 +00:00
Stephen Zhou 62910e80e9 chore: move to vp pack, merge vitest config (#550)
* chore: migrate to vp pack

* No copy

* Move test

* Update tsconfig
2026-03-15 11:58:42 +00:00
Sunil Pai acd1110b04 fix: inline source content in sourcemaps to prevent missing source warnings (#5)
When vinext is installed from npm, the .ts source files aren't in the
package but .js.map files reference them, causing Vite to log many
'points to missing source files' warnings.

Adding inlineSources: true to tsconfig embeds the original TypeScript
source content directly in the .js.map files so no separate .ts files
are needed.

Fixes #2
2026-02-24 11:13:41 -06:00
Steve Faulkner 12fea722b6 Initial public release of vinext 2026-02-24 09:29:39 -06:00