Skip to content

Switch the plugin to pure ESM + WASM distribution#41

Open
mourner wants to merge 6 commits intomainfrom
pure-esm
Open

Switch the plugin to pure ESM + WASM distribution#41
mourner wants to merge 6 commits intomainfrom
pure-esm

Conversation

@mourner
Copy link
Copy Markdown
Member

@mourner mourner commented Mar 23, 2026

Currently, we have a single-file JS distribution where WASM is base64-embedded in the JS file (36.9 kB minzipped). This PR switches the library to a ES Module entry point with named exports and a separate WASM distribution:

  • small ESM JS bundle (1.2 kB)
  • separate WASM file (27.8 kB)

This will allow for a clean dynamic import into GL JS, and reduce the overall bundle size by 22%.

@mourner mourner requested a review from stepankuzmin March 23, 2026 13:47
stepankuzmin
stepankuzmin previously approved these changes Mar 23, 2026
Copy link
Copy Markdown
Contributor

@stepankuzmin stepankuzmin left a comment

Choose a reason for hiding this comment

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

Awesome! Added a couple of nits that could be addressed separately 👍

Co-authored-by: Stepan Kuzmin <533564+stepankuzmin@users.noreply.github.com>
@mourner
Copy link
Copy Markdown
Member Author

mourner commented Mar 23, 2026

Will merge this once we land RTL loading via dynamic import in a stable GL JS release.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants