Open rallisf1 opened 2 years ago
This fixed my issue for the debug package but I am getting error:
Uncaught Error: reCAPTCHA placeholder element must be an element or id
Do you have an example of how you included the <Recaptcha>
in the html section of the Svelte app?
Tbh this patch only worked for a couple of days for me and another vite update broke it as well. I am now using a version completely stripped out of debug.
Anyways, the html portion looks like:
<form name={name} on:submit|preventDefault={submitHandler}>
...
<div class="form-control mb-3">
<Recaptcha
sitekey={variables.recaptchaKey}
badge={"inline"}
size={"invisible"}
on:error={onCaptchaError}
on:ready={onCaptchaReady} />
</div>
...
</form>
apparently I'm using tailwind and have a few functions in my <script>
tag to handle the form, enable the submit button onCaptchaReady and handle errors.
Thank you will take a look at the other branch, have you seen this error at all?
Uncaught Error: No reCAPTCHA clients exist.
Thank you will take a look at the other branch, have you seen this error at all?
Uncaught Error: No reCAPTCHA clients exist.
no sorry
I am kinda new to this but this should do it.
I replaced "debug" with "@milahu/debug-esm" which is an esm fork of debug. Keep in mind debug v5 will support esm and you should switch back.
I also fixed the lib exports as vite would nag about default exporting.
P.S. You should include the src of the demo so we can test it faster. Remember to load the recaptcha key from env and exclude that in .gitignore