Next.js Discord

Discord Forum

Generate typedRoutes types without full build

Unanswered
Harrier posted this in #help-forum
Open in Discord
HarrierOP
Hello! I have an issue, where I need types from .next, namely link.d.ts for typechecking in the CI. I disabled lint and typecheck in next.config.mjs, as these actions are part of my CI.

Is it possible to generate these types without going through a whole build? I observed, that this file is populated in the quite early step of build process. Is it possible to extract them somehow?

I'm fine with some intermediary steps as long as it doesn't require a full build of next.js app.

2 Replies