Skip to content

Use import() syntax in route manifest for IDE navigation - #12

Merged
JoviDeCroock merged 5 commits into
mainfrom
JoviDeCroock/manifest-imports
Apr 8, 2026
Merged

Use import() syntax in route manifest for IDE navigation#12
JoviDeCroock merged 5 commits into
mainfrom
JoviDeCroock/manifest-imports

Conversation

@JoviDeCroock

Copy link
Copy Markdown
Owner

Summary

  • Route manifests now accept () => import("./path") as the module reference, enabling ctrl+click navigation in IDEs (VS Code, JetBrains, etc.)
  • The vite plugin transforms these back to plain strings at build time via a regex-based transform hook, so internal string-based resolution is unchanged
  • Added ModuleRef type (string | (() => Promise<any>)) to route(), defineApp shells/middleware, and RouteConfig
  • Pages router generated manifests now emit () => import() syntax
  • Plain string paths remain fully supported (backwards compatible)

Test plan

  • pnpm build passes
  • pnpm typecheck — same pre-existing failures as main (missing external type declarations)
  • pnpm test — same pre-existing failures as main (missing preact-suspense)
  • pnpm e2e — same pre-existing failures as main (pnpm workspace linking issue locally)
  • CI should pass — all failures are identical to main branch

🤖 Generated with Claude Code

@JoviDeCroock
JoviDeCroock force-pushed the JoviDeCroock/manifest-imports branch 5 times, most recently from e1ed397 to b97e993 Compare April 8, 2026 00:27
JoviDeCroock and others added 4 commits April 8, 2026 19:33
Route manifests now accept `() => import("./path")` as the file reference,
enabling ctrl+click navigation in IDEs. The vite plugin transforms these
back to plain strings at build time, so the internal resolution is unchanged.
Plain string paths remain supported for backwards compatibility.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@JoviDeCroock
JoviDeCroock force-pushed the JoviDeCroock/manifest-imports branch from 95bc355 to 31f3d73 Compare April 8, 2026 17:35
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@JoviDeCroock
JoviDeCroock merged commit 0768348 into main Apr 8, 2026
1 check passed
@JoviDeCroock
JoviDeCroock deleted the JoviDeCroock/manifest-imports branch April 8, 2026 17:38
@github-actions github-actions Bot mentioned this pull request Apr 8, 2026
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

Successfully merging this pull request may close these issues.

1 participant