Skip to content
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

fix(vue-2): rework how vue 2 plugin gets head instance #227

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

vetruvet
Copy link
Contributor

Make vue 2 plugin not reference head directly, get it from root component options instead

πŸ”— Linked issue

#216

❓ 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

The comment in 1dfe189 about the pinia plugin sparked a thought for an alternative way for the plugin to work. Basically instead of passing the unhead instance to Vue.use, have the plugin get it from this.$options.unhead (which would only be present on the root component).

The changes in 1dfe189 would still result in the behavior described here.

πŸ“ Checklist

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

@nuxt-studio
Copy link

nuxt-studio bot commented Sep 12, 2023

βœ… Live Preview ready!

Name Edit Preview Latest Commit
unhead Edit on Studio β†—οΈŽ View Live Preview 55dbae0

@vercel
Copy link

vercel bot commented Sep 12, 2023

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
unjs-unhead βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Sep 12, 2023 2:57pm

@harlan-zw
Copy link
Collaborator

Thank you! I appreciate the help on this, I think I have just been going around in circles.

@harlan-zw harlan-zw merged commit 13aec6d into unjs:main Sep 12, 2023
2 checks passed
@vetruvet
Copy link
Contributor Author

Glad to help! Thanks for maintaining this package!

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.

2 participants