Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(schema): add hookable dependency #9648

Merged
merged 1 commit into from
Dec 12, 2022
Merged

fix(schema): add hookable dependency #9648

merged 1 commit into from
Dec 12, 2022

Conversation

sxzz
Copy link
Contributor

@sxzz sxzz commented Dec 10, 2022

fix the phantom dependency issue

πŸ”— Linked issue

relate nuxt/nuxt#14146

❓ 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 like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Add hookable. It's only added in nuxt package. I only need defineNuxtModule from @nuxt/kit. Then hookable pkg is missing.

πŸ“ Checklist

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

fix phantom dependency issue
@codesandbox
Copy link

codesandbox bot commented Dec 10, 2022

CodeSandbox logoCodeSandbox logoΒ  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@vercel
Copy link

vercel bot commented Dec 10, 2022

@sxzz is attempting to deploy a commit to the Nuxt Team on Vercel.

A member of the Team first needs to authorize it.

@danielroe
Copy link
Member

danielroe commented Dec 10, 2022

What is the issue? I'm assuming it's about the types provided by hookable, as I think there is no runtime dependency on it.

@sxzz
Copy link
Contributor Author

sxzz commented Dec 10, 2022

See here https://github.com/sxzz/unplugin-vue-macros/blob/rollup-3/packages/nuxt/src/index.ts#L20

I only used defineNuxtModule to define a Nuxt module, and nuxt.hook referenced Hookable finally.

	hooks: Hookable<NuxtHooks>;
    hook: Nuxt['hooks']['hook']; // definition of `nuxt.hook`

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for PR!

Ideally we should be able to inline external types for schema but since we already added other deps, this looks good to me as fix.

@pi0 pi0 changed the title fix(schema): add hookable dep fix(schema): add hookable dependency Dec 12, 2022
@pi0 pi0 merged commit 2804c4c into nuxt:main Dec 12, 2022
@sxzz sxzz deleted the fix/dep-hookable branch December 12, 2022 11:44
@pi0 pi0 mentioned this pull request Dec 15, 2022
6 tasks
@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe mentioned this pull request Jan 20, 2023
danielroe pushed a commit that referenced this pull request Jan 21, 2023
sxzz added a commit to vue-macros/vue-macros that referenced this pull request Feb 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants