Skip to content

[SDC-32633] Document Web SDK UMD builds#403

Open
anthonypenna wants to merge 1 commit into
mainfrom
feature/SDC-32633-document-web-sdk-umd-builds
Open

[SDC-32633] Document Web SDK UMD builds#403
anthonypenna wants to merge 1 commit into
mainfrom
feature/SDC-32633-document-web-sdk-umd-builds

Conversation

@anthonypenna

@anthonypenna anthonypenna commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Adds an "Install via UMD build" section to the Web SDK installation page, covering how to load the SDK from plain <script> tags via browser globals, without a bundler — complementing the existing npm and ESM/CDN options.

Tested locally with yarn build.

Note for reviewers: the UMD build ships in 8.6.0 (SDC-31903, fix version 8.6.0-beta.1). It is not in 8.5.x — verified not cherry-picked to release/8.5 — so the /umd CDN paths in the example won't resolve until 8.6.0 is released. Please don't publish this page before the 8.6.0 release.

Closes SDC-32633

Comment thread docs/sdks/web/add-sdk.md
A classic `<script>` (unlike `<script type="module">`) does not support top-level `await`, so wrap the setup code in an async function as shown below.
:::
### Complete UMD Example

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we just keep the interesting part in this section? a complete example seems superfluous and gives a lot of space to UMD in this page.

Comment thread docs/sdks/web/add-sdk.md
## Install via UMD build (plain `<script>` tags)
Alongside the ES module (ESM) build, every Scandit package ships a [UMD](https://github.com/umdjs/umd) build. This lets you load the SDK with plain `<script>` tags, without a bundler or an [import map](#install-via-cdn). Each package exposes its exports on a browser global:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should mention that using UMD leads to longer startup time because of larger files to download (it cannot be optimised like a bundle consuming our ES modules), so it should only be used when ES module is not possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants