Generate typedRoutes types without full build
Unanswered
Harrier posted this in #help-forum
HarrierOP
Hello! I have an issue, where I need types from
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.
.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
HarrierOP
Is there other solution than committing this file?
@Harrier 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.
https://github.com/joulev/nextjs-route-types
maybe this one?
maybe this one?