Remove the browser field from package.json (which previously pointed to the IIFE build of the library), and replace it with a jsdelivr field pointing to same location.
While IIFE is appropriate for direct-to-browser use with CDNs like jsDelivr and UNPKG, front end frameworks like webpack also refer to this browser field - but they should use standard CommonJS build instead to import the library correctly.
Testing done:
This change can be conveniently tested in user code via published NPM version v0.2.2-alpha.1.
The sample A2I review template in Amazon-Textract-Transformer-Pipeline (which references the IIFE build but also the TypeScript annotations) still builds and runs okay.
Next steps:
Ideally we can get fix confirmation from the issue author, then publish mainline 0.2.2 release, rebase the fix branch, and merge.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Issue #, if available: #139
Description of changes:
browser
field from package.json (which previously pointed to the IIFE build of the library), and replace it with ajsdelivr
field pointing to same location.While IIFE is appropriate for direct-to-browser use with CDNs like jsDelivr and UNPKG, front end frameworks like webpack also refer to this
browser
field - but they should use standard CommonJS build instead to import the library correctly.Testing done:
This change can be conveniently tested in user code via published NPM version v0.2.2-alpha.1.
From my side, verified that:
Next steps:
Ideally we can get fix confirmation from the issue author, then publish mainline
0.2.2
release, rebase the fix branch, and merge.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.