vue-recaptcha-v3 icon indicating copy to clipboard operation
vue-recaptcha-v3 copied to clipboard

Load on local component instead of global

Open rlidev opened this issue 1 year ago • 3 comments

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.

rlidev avatar Mar 15 '23 12:03 rlidev

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

yooouuri avatar Apr 19 '23 07:04 yooouuri

You can use the property autoHideBadge= true, for example:

createApp(App) .use(VueReCaptcha, { siteKey: <key>, loaderOptions: { useRecaptchaNet: true, autoHideBadge: true } }) .mount('#app')

alanscordoba avatar Aug 16 '23 21:08 alanscordoba