Skip to content

fix: support useHead outside of components#825

Merged
danielroe merged 1 commit into
nuxt-modules:mainfrom
BobbieGoede:fix/use-head-outside-components
Sep 12, 2025
Merged

fix: support useHead outside of components#825
danielroe merged 1 commit into
nuxt-modules:mainfrom
BobbieGoede:fix/use-head-outside-components

Conversation

@BobbieGoede

Copy link
Copy Markdown
Member

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ 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

This changes the wrapper/implementation of useHead so that lifecycle hooks are only used when ran from within a component which matches the original useHead behavior.

@netlify

netlify Bot commented Sep 12, 2025

Copy link
Copy Markdown

Deploy Preview for friendly-lamington-fb5690 ready!

Name Link
🔨 Latest commit bd19579
🔍 Latest deploy log https://app.netlify.com/projects/friendly-lamington-fb5690/deploys/68c4380cb1fa1c0008d2b924
😎 Deploy Preview https://deploy-preview-825--friendly-lamington-fb5690.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Sep 12, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.84%. Comparing base (506b5a4) to head (bd19579).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/runtime/composables/head.ts 0.00% 37 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #825      +/-   ##
==========================================
- Coverage   49.04%   48.84%   -0.21%     
==========================================
  Files          12       12              
  Lines         732      735       +3     
  Branches       53       53              
==========================================
  Hits          359      359              
- Misses        373      376       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@danielroe danielroe merged commit 2af38f3 into nuxt-modules:main Sep 12, 2025
7 of 9 checks passed
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.

i18n call usehead function outside the setup function

2 participants