Add build step for tiktoken wasm

This commit is contained in:
Saoud Rizwan committed 2024-08-26 01:00:00 -04:00
1 parent 5ef5d99433
commit 2a0a5435bc
1 file changed
+7
+7
View File
@@ -29,6 +29,13 @@ const copyWasmFiles = {
name: "copy-wasm-files",
setup(build) {
build.onEnd(() => {
// tiktoken
fs.copyFileSync(
path.join(__dirname, "node_modules", "tiktoken", "tiktoken_bg.wasm"),
path.join(__dirname, "dist", "tiktoken_bg.wasm")
)
// tree sitter
const sourceDir = path.join(__dirname, "node_modules", "web-tree-sitter")
const targetDir = path.join(__dirname, "dist")