Skip to content

Conversation

@devm33
Copy link
Collaborator

@devm33 devm33 commented Apr 22, 2025

Deferring the require calls to load the Node.js fs and path modules is all that is needed to enable web compatible if the the tokenizer file contents are loaded through other means and supplied to the library.

Based on a similar approach taken by web-tree-sitter.

Fixes #45

@shengyfu
Copy link
Member

@devm33 thanks for addressing the web compatibility, could you bump the version?

@devm33
Copy link
Collaborator Author

devm33 commented Apr 25, 2025

@devm33 thanks for addressing the web compatibility, could you bump the version?

Done 039f814

@shengyfu shengyfu merged commit 3da6b5e into microsoft:main Apr 25, 2025
1 of 2 checks passed
@devm33 devm33 deleted the web branch April 25, 2025 18:17
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.

Tokenizer TS Web Browser Compatability

2 participants