Himujjal / tree-sitter-svelte

Tree sitter grammar for Svelte
MIT License
81 stars 14 forks source link

Document requirement for static linking to work with Wasm #45

Open gushogg-blake opened 10 months ago

gushogg-blake commented 10 months ago

I think the custom scanner for this grammar uses functions that aren't in Tree-sitter's main exports.json file, which means you get an error when trying to parse with a dynamically loaded wasm module (see https://github.com/tree-sitter/tree-sitter/issues/949).

I've outlined a workaround here - https://edita.vercel.app/blog/tree-sitter-howto/

When I was last looking into this Max hadn't decided on an approach to fixing it so might be a good idea to include a note in the readme that it needs a workaround for now.