#lemmiwinks_best-practices
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1332021302537617600
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello
yeah including the script tag is fine, alternatively you can just import as a side effect at your root: https://github.com/stripe/stripe-js?tab=readme-ov-file#import-as-a-side-effect
Gotcha, that link doesn't load for me BTW but if this follows best practices then we'll continue forward.
I'd use the side effect of the global import if we were using Vue specifically and had a main.ts/js file but with Nuxt I think having the script tag globally makes it a bit easier if the stripe module is smart enough not to double inject ๐
Sorry I edited the link
Dropped the wrong one in there previously.
That said, makes sense!
Gotcha, all good, that's the docs I showed my partner dev, we're switching from recurly to stripe for our business and ant to do this right the first time ๐ Thank you for the help!
In terms of double injection... you would actually need to test that.
But I think it should work as expected!
When I go to our checkout page I only see one script tag included when calling loadStripe and having the script in our nuxt config head so i think we're good
thanks for the help, I think we're all good here then