Selaa lähdekoodia

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

Chris Estreich 8 kuukautta sitten
vanhempi
sitoutus
67ec7560ee
1 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  1. 7 1
      esbuild.js

+ 7 - 1
esbuild.js

@@ -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")