-
-
Notifications
You must be signed in to change notification settings - Fork 7
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: public runtimeconfig types #11
Conversation
declare module "nuxt/schema" { | ||
interface PublicRuntimeConfig { | ||
__serverLoaders__: string[] | ||
} | ||
} | ||
|
||
export { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this isn't being distributed with your module. You can add it to runtime
directory and then add it to the end user's project with prepare:types
hook. Or add a type template to do this. You might even be able just to move these lines into module.ts
, but I haven't confirmed if that's enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I initially had it in module.ts and that didn't work. It's a little annoying that this needs to be manually included as part of the module runtime T_T
Maybe we can have a convention that nuxt module bundler
will detect automatically, like nuxt-types.d.ts
in src
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wait, this is only intended within the module code, ie not for end users? You can probably move the types.d.ts out of src then. It shouldn't be in the build in that case
@danielroe Unfortunately your suggestion doesn't work. It looks like |
Attempt to fix the type error that happens due to nuxt 3.6