New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(nuxt): add pages:routerOptions
hook
#24922
Conversation
Run & review this pull request in StackBlitz Codeflow. |
β Live Preview ready!
|
pages:router-options
hookpages:routerOptions
hook
/trigger release |
π Release triggered! You can now install nuxt@npm:nuxt-nightly@pr-24922 |
/trigger release |
π Release triggered! You can now install nuxt@npm:nuxt-nightly@pr-24922 |
/trigger release |
π Release triggered! You can now install nuxt@npm:nuxt-nightly@pr-24922 |
I think we probably do need to keep calling this within the template (or update it manually when watched paths are detected) or we won't have updates when user adds/removes an |
This reverts commit 14f8ad0.
Makes sense, reverted :) |
π Linked issue
resolves #24141
β Type of change
π Description
This adds a new hook:
pages:routerOptions
. It allows modifying the detectedapp/router.options.ts
files from layers, as well as adding new router options (for example, from a module).If
optional: true
is set, then this will not force pages integration. (Which is ideal for a custom scroll behaviour, for example.π Checklist