Skip to content

Use dart.library.js_interop for Wasm-ready conditional imports - #53

Merged
Rexios80 merged 1 commit into
mainfrom
fix/wasm-js-interop-conditional-import
Jul 28, 2026
Merged

Use dart.library.js_interop for Wasm-ready conditional imports#53
Rexios80 merged 1 commit into
mainfrom
fix/wasm-js-interop-conditional-import

Conversation

@Rexios80

Copy link
Copy Markdown
Collaborator

Summary

  • Replace dart.library.js with dart.library.js_interop in web conditional imports so Wasm selects the web API implementation instead of the native/dart:io path.
  • Fixes the missing 10 pub points from pana's Wasm compatibility check.

Test plan

  • dart pub global run pana vrchat_dart reports Wasm-ready / full platform points
  • Existing native + web examples still initialize correctly

dart.library.js is false under Wasm, so pana selected the native API
implementation and reported a dart:io dependency via cookie_jar.

Switching to dart.library.js_interop keeps the web implementation on
both JS and Wasm, restoring the missing pub points.
@Rexios80
Rexios80 merged commit 0b79b09 into main Jul 28, 2026
3 checks passed
@Rexios80
Rexios80 deleted the fix/wasm-js-interop-conditional-import branch July 28, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant