Skip to content

Commit

Permalink
fix: add footer to expose hCaptchaLoader as function instead of hCapt…
Browse files Browse the repository at this point in the history
…chaLoader.hCaptchaLoader
  • Loading branch information
brdlyptrs committed Feb 8, 2024
1 parent 5ca4480 commit 6e154da
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/esbuild.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,16 @@ if (WATCH) {
...config,
entryPoints: undefined,
format: 'iife',
globalName: 'hCaptcha',
globalName: 'hCaptchaLoaderPkg',
stdin: {
contents: transformedESM.code,
resolveDir: DIST,
sourcefile: 'index.es5.js',
},
outfile: resolve(DIST, 'index.es5.js'),
footer: {
js: 'var hCaptchaLoader = hCaptchaLoaderPkg.hCaptchaLoader;',
},
treeShaking: true,
target: [
'es5',
Expand Down

0 comments on commit 6e154da

Please sign in to comment.