How to transpile TypeScript using Bun?

I haven't been able to successfully transpile the code and run it using the bun build command.
Solution:
bun start in package.json:
"scripts": {
"start": "bun src/index.ts"
},
"scripts": {
"start": "bun src/index.ts"
},
...
Jump to solution
9 Replies
Favna
Favna•2mo ago
When using Bun you dont need to compile at all, just run the TS files without first building.
MRDGH2821
MRDGH2821•2mo ago
On a side note, bun can run sapphire code with lesser issues than before? 🤔 I. E. What Is the state of bun + sapphire?
Favna
Favna•2mo ago
Were there ever issues?
MRDGH2821
MRDGH2821•2mo ago
I have been out of touch over an year, I should really run my bot code in bun to see if there's any 🤔
nijama.dev
nijama.devOP•2mo ago
Sometimes a version of bun will have issues, so I roll back to the previous one, but the new 1.2.0 have been smooth so far.
Prosta4ok_ua
Prosta4ok_ua•2mo ago
I'm using the latest Bun version and have no issues so far.
nijama.dev
nijama.devOP•2mo ago
What command do you use?
Solution
Prosta4ok_ua
Prosta4ok_ua•2mo ago
bun start in package.json:
"scripts": {
"start": "bun src/index.ts"
},
"scripts": {
"start": "bun src/index.ts"
},
Favna
Favna•2mo ago
Going to mark the above as the answer because it also covers what I said initially to just use bun start

Did you find this page helpful?