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
then import it from nuxt.config.js (like you say #1 )
// nuxt.config.jsmodule.exports={// ... your other config options ...plugins: [// ... other plugins you might have registered ... //{src: '~/plugins/v-stripe-elements',ssr: false}]}
Declare module v-stripe-element.d.ts
Create file v-stripe-element.d.ts inside type folder with following content:
declare module 'v-stripe-elements/lib/index'
Include v-stripe-element.d.ts in tsconfig if you are not already import all .d.ts
Any way to use it with typescript ?
Currently i have following error:
Module '"../../../../node_modules/v-stripe-elements/types"' has no exported member 'VStripeCard'
I try also to import like that:
import { VStripeCard } from 'v-stripe-elements/lib/index'
And then add
declare module 'v-stripe-elements/lib/index'
in a .d.ts fileBut then I have following error:
Cannot use import statement outside a module
The text was updated successfully, but these errors were encountered: