You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importimageUrlBuilderfrom'@sanity/image-url'exportdefaultdefineNuxtPlugin(()=>{constbuilder=imageUrlBuilder(useSanity().config)// <-- here is the problemfunctionurlFor(source){returnbuilder.image(source).auto('format')}return{provide: { urlFor }}})
Doesn't work for me as the type seems wrong:
Argument of type 'SanityConfiguration' is not assignable to parameter of type 'SanityClientLike | SanityProjectDetails | SanityModernClientLike | undefined'.
Type 'SanityConfiguration' is not assignable to type 'SanityProjectDetails'.
Types of property 'dataset' are incompatible.
Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.ts(2345)
Should this work?
The text was updated successfully, but these errors were encountered:
Following example from here:
Doesn't work for me as the type seems wrong:
Should this work?
The text was updated successfully, but these errors were encountered: