Is it feasible for Bun to bundle my TypeScript upon saving a file in VS Code?
The instruction manual suggests running bun run index.ts
in the command line and including it in the package.json
in this manner. However, I am unsure how to automate this process to run upon saving.
{
"name": "quickstart",
"module": "index.ts",
"type": "module",
"scripts": {
"start": "bun run index.ts"
},
"devDependencies": {
"@types/bun": "^1.0.0"
}
}
UPDATE:
I have been using commands like bun run start
and bun run index.ts
, but there is also a command called bun bun.build.js
that might be relevant.