nuxt / module-builder

Complete solution to build and ship Nuxt modules.
MIT License
212 stars 22 forks source link

Plugin injections are unknown #215

Closed ibockowsky closed 2 months ago

ibockowsky commented 6 months ago

Environment


Reproduction

https://stackblitz.com/edit/github-nlraem?file=app.vue

Describe the bug

image

This type should be known

Additional context

No response

Logs

No response

stackblitz[bot] commented 6 months ago

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

manniL commented 6 months ago

Related: https://github.com/nuxt/nuxt/issues/24885 Possibly related: unjs/mkdist#22

In this issue, we should find the root cause why the generated plugin types are any though 🤔

image

Moving this to the module builder repo.

manniL commented 6 months ago

But I wonder - apparently this is correct by design? 🤔 https://github.com/nuxt/module-builder/blob/f158ffaf6443909c3882337ebda49de4a8db2d4f/test/build.spec.ts#L87-L94

https://github.com/nuxt/module-builder/blob/f158ffaf6443909c3882337ebda49de4a8db2d4f/example/src/runtime/plugin.ts#L1

RyanClementsHax commented 4 months ago

If it helps, I was able to reproduce this with a custom plugin too https://codesandbox.io/p/devbox/nuxt-plugin-typing-repro-xvtm2t

danielroe commented 2 months ago

resolved in https://github.com/nuxt/module-builder/pull/255.