module-builder icon indicating copy to clipboard operation
module-builder copied to clipboard

Type 'NuxtModule<ModuleOptions>' is not assignable to type 'string | false | NuxtModule<ModuleOptions> | ...

Open markbrockhoff opened this issue 1 year ago • 0 comments

Hi,

after using this template to kickstart my module I encountered a strange type issue inside the nuxt config of the test fixture: image

It looks like somehow the types exported from the module differ from the ones actually defined. The problem only occurs once something is added to the ModuleOptions interface, as long as it's empty there is no issue. Maybe this issue is related to #223.

I created a very minimal reproduction here: https://github.com/markbrockhoff/nuxt-module-template-bug-repro To reproduce the issue just clone the repo, install the dependencies using pnpm and run pnpm dev:prepare to generate the types. Afterwards open the file test/fixture/build/nuxt.config.ts or run pnpm test:types to see the type conflict.

Any help on this would be appreciated.

markbrockhoff avatar Jun 11 '24 11:06 markbrockhoff