Skip to content

Include WASM in npm package#87

Merged
jonatanklosko merged 2 commits intoelixir-lang:mainfrom
yordis:yordis/include-wasm-in-npm-package
Mar 2, 2026
Merged

Include WASM in npm package#87
jonatanklosko merged 2 commits intoelixir-lang:mainfrom
yordis:yordis/include-wasm-in-npm-package

Conversation

@yordis
Copy link
Contributor

@yordis yordis commented Mar 2, 2026

Summary

  • Add *.wasm to files so the pre-built WASM is included in the npm tarball
  • Add prepack script to build the WASM before publishing

Other tree-sitter grammars (Go, JS, TS) already ship pre-built WASM files, enabling web-tree-sitter users to load grammars via require.resolve without building from source.

Other tree-sitter grammars (Go, JS, TS) ship pre-built WASM files,
enabling web-tree-sitter users to load grammars without building
from source.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Copy link
Member

@jonatanklosko jonatanklosko left a comment

Choose a reason for hiding this comment

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

Sounds good, thanks :)

@jonatanklosko jonatanklosko merged commit 0d26ef5 into elixir-lang:main Mar 2, 2026
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.

2 participants