vue-recaptcha-v3
vue-recaptcha-v3 copied to clipboard
Load on local component instead of global
Does anyone know how to load the library in a single page/component for example (contact page) instead of loading it globally from app.js ?
This is because it unnecessarily loads the library on pages that do not use Recaptcha and it is not very optimal.
https://github.com/AurityLab/vue-recaptcha-v3/blob/master/src/ReCaptchaVuePlugin.ts
You need to move the provide
to a kind of init function https://github.com/AurityLab/vue-recaptcha-v3/blob/master/src/ReCaptchaVuePlugin.ts#L36-L41
You can use the property autoHideBadge= true, for example:
createApp(App) .use(VueReCaptcha, { siteKey: <key>, loaderOptions: { useRecaptchaNet: true, autoHideBadge: true } }) .mount('#app')