Skip to content

Commit 0927c08

Browse files
committed
fix: bundle @huggingface/transformers instead of external resolution
Removes --external @huggingface/transformers from build, bundling it into dist/index.js. Moves the dependency to devDependencies since it's no longer needed at runtime. Eliminates the ENOENT utils/devices.js error caused by broken package structure in @huggingface/transformers.
1 parent ba5c320 commit 0927c08

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/plugin/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"README.md"
3333
],
3434
"scripts": {
35-
"build": "bun build src/index.ts --outdir dist --target bun --format esm --external @huggingface/transformers --external @opencode-ai/plugin && bun build src/cli/index.ts --outfile dist/cli.js --target node --format esm && tsc --emitDeclarationOnly",
35+
"build": "bun build src/index.ts --outdir dist --target bun --format esm --external @opencode-ai/plugin && bun build src/cli/index.ts --outfile dist/cli.js --target node --format esm && tsc --emitDeclarationOnly",
3636
"typecheck": "tsc --noEmit && tsc -p tsconfig.scripts.json",
3737
"test": "bun test",
3838
"lint": "biome check .",
@@ -44,14 +44,14 @@
4444
},
4545
"dependencies": {
4646
"@clack/prompts": "^1.1.0",
47-
"@huggingface/transformers": "~3.7.6",
4847
"@opencode-ai/plugin": "^1.2.26",
4948
"@opencode-ai/sdk": "^1.2.26",
5049
"ai-tokenizer": "^1.0.6",
5150
"comment-json": "^4.6.2",
5251
"zod": "^4.1.8"
5352
},
5453
"devDependencies": {
54+
"@huggingface/transformers": "~3.7.6",
5555
"@types/node": "^22.0.0",
5656
"bun-types": "^1.3.10",
5757
"typescript": "^5.8.0",

0 commit comments

Comments
 (0)