Closed YosefMets closed 1 year ago
It all comes down to this:
But I'm having an hard time trying to fix this.
In #19 I wanted to fix a double call for the useClientStripe
, but in doing so I was able to just remove that line, this could potentially fix both issues.
@Sandros94 I don't understand your approach. So you finally fixed it? Cause there's nothing I can do about this problem
So you finally fixed it? Cause there's nothing I can do about this problem
Yes, I did manage to fix it, but it is still under review in that PR. I should update the description to mention this issue too.
I don't understand your approach.
The issue was just that the stripe-js (the one that is responsible to load Stripe script and HTML elements client side) not only it was forcefully loaded as a global plugin, always present and available, but it was double called when used with useClientStripe
.
I know its not a good practice (with security concerns), but you could clone the repo I use for the PR and do yarn && yarn prepack && yarn pack
to create a local tgz to use test in your project.
Hey hope you doing good I will have a look this weekend of your work :)
Hey I have done a PR that should handle the behavior you are expecting. It will be loaded only the first time you will use it. Check the PR. This will be merge this week. It will create a breaking change as we are going to harmonize the api config
I'll mainly respond in the PRs #19 and #22. But long story short IMO:
addPlugin
it will make it load app/website wide, degrading user performance once it has loaded it regardeless of the page where the user is.Why open up a new PR when there is already another one that is currently discussed on with the maintainers?
Hi, After adding this modul to
nuxt.config
all Stripe scripts and HTML element were rendered on all pages. I don't even use it. Is it possible to only add it to pages where I use it and with lazy loading?