Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
**/.DS_Store
**/.so
**/.kt
/target
/wasm/dist
# Generated by `bun run generate:version` (chained into `npm run build:ts`).
# Not committed — a tracked copy would go dirty whenever a build ran against
# a different package version.
wasm/src/version.ts
Comment thread
pullfrog[bot] marked this conversation as resolved.
# Created by https://www.toptal.com/developers/gitignore/api/intellij,rust
# Edit at https://www.toptal.com/developers/gitignore?templates=intellij,rust

Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# CHANGELOG

## 1.0.16

npm-only release (`@superwall/superscript`). Also aligns the npm package version — previously lagging at 1.0.3 — with the repo versioning.

### Fixes

- Fixes the `/browser` entry throwing `wasm.__wbindgen_start is not a function` at load time in bundlers that resolve `.wasm` imports as plain file assets instead of wasm modules (Bun out of the box, esbuild with `--loader:.wasm=file`). The loader tries the wasm-pack `--target bundler` output first, then a new `--target web` build initialised from base64-inlined wasm bytes (code-split, so webpack `asyncWebAssembly` / vite-plugin-wasm consumers never fetch it). An optional third path fetches wasm from a URL, but only if the consumer opts in before a load attempt (flags are re-read on each attempt, including the post-cooldown retry): `globalThis.SUPERWALL_SUPERSCRIPT_WASM_CDN = true` uses the exact-version jsDelivr URL (`cdn.jsdelivr.net/npm/@superwall/superscript@<version>/dist/target/web/superscript_bg.wasm`); `globalThis.SUPERWALL_SUPERSCRIPT_WASM_URL` points at a self-hosted copy and wins if both are set. Off by default — no third-party request, no CSP change. A total miss is memoized for 10s so N audience evaluations don't retry the full load N times; after the cooldown one retry is allowed. Successful inline `atob` is cached until init succeeds, then dropped. When every path fails, the thrown error aggregates all per-path causes and, if the CDN path was not attempted, names the opt-in flags. This is a runtime fallback only — default esbuild and Next.js' default webpack config still fail at *build* time and need `--loader:.wasm=file` / `experiments.asyncWebAssembly`. Also removes noisy `console.log` calls from the browser host-context callbacks.

## 1.0.15

### Fixes
Expand Down
343 changes: 217 additions & 126 deletions examples/browser/bun.lock

Large diffs are not rendered by default.

Binary file removed examples/browser/bun.lockb
Binary file not shown.
Loading
Loading