Skip to content

Commit

Permalink
fix: sourcemaps and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
faris-imi committed Feb 15, 2024
1 parent 314b35c commit d6bdc2e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
15 changes: 1 addition & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ import '@hCaptcha/loader/dist/polyfills.js';
// ES5 version of hCaptcha Loader
import '@hCaptcha/loader/dist/index.es5.js';

hCaptchaLoader().then(function(hcaptcha) {
window['hCaptchaLoader']().then(function(hcaptcha) {
var element = document.createElement('div');
// hCaptcha API is ready
hcaptcha.render(element, {
Expand All @@ -76,19 +76,6 @@ hCaptchaLoader().then(function(hcaptcha) {
});
});

```
### TypeScript
To ensure compatibility with TypeScript environments, use indexer access:
```ts

window['hCaptchaLoader']().then(function(hcaptcha) {
var element = document.createElement('div');
// hCaptcha API is ready
hcaptcha.render(element, {
sitekey: 'YOUR_SITE_KEY',
// Additional options here
});
});
```

### CDN
Expand Down
2 changes: 1 addition & 1 deletion lib/esbuild.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const config = {

const swcOptions = {
minify: true,
sourceMaps: true,
sourceMaps: BUILD === 'development',
jsc: {
target: 'es5',
},
Expand Down

0 comments on commit d6bdc2e

Please sign in to comment.