Skip to content

feat(vite): add vite:before:close hook#4440

Open
userquin wants to merge 1 commit into
nitrojs:mainfrom
userquin:add-before-close-nitro-hook
Open

feat(vite): add vite:before:close hook#4440
userquin wants to merge 1 commit into
nitrojs:mainfrom
userquin:add-before-close-nitro-hook

Conversation

@userquin

Copy link
Copy Markdown

🔗 Linked issue

#4428

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Vite builder differs a lot from Rolldown/Rollup builders, the new hook is only for Vite builder and for build.

Once Nitro is closed, any asset written to the output public folder won't be added to the routes (404 when requesting assets generated at compiled hook)

We should add a custom entry for hooks like Nuxt docs, the config entry only mentons hookable and links to lifecycle that seems unrelated to Nitro hooks.

resolves #4428

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@userquin
userquin requested a review from pi0 as a code owner July 16, 2026 21:09
@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

@userquin is attempting to deploy a commit to the Nitro Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

An error occurred during the review process. Please try again later.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

provide new hook to be triggered before closing nitro

1 participant