Copy tree-sitter.wasm to dist (#3046)

This commit is contained in:
Chris Estreich 2025-04-29 16:12:13 -07:00 committed by GitHub
parent f120de6a34
commit 67ec7560ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -32,12 +32,18 @@ const copyWasmFiles = {
const nodeModulesDir = path.join(__dirname, "node_modules")
const distDir = path.join(__dirname, "dist")
// tiktoken
// tiktoken WASM file
fs.copyFileSync(
path.join(nodeModulesDir, "tiktoken", "tiktoken_bg.wasm"),
path.join(distDir, "tiktoken_bg.wasm"),
)
// Main tree-sitter WASM file
fs.copyFileSync(
path.join(nodeModulesDir, "web-tree-sitter", "tree-sitter.wasm"),
path.join(distDir, "tree-sitter.wasm"),
)
// Copy language-specific WASM files
const languageWasmDir = path.join(__dirname, "node_modules", "tree-sitter-wasms", "out")