Support `watch: true` in `Bun.build()`
Like the title says, i wanted to run the bundler in watch mode using a js file containing ```js await Bun.build({ entrypoints: ["./test.ts"], outdir: ["./dist"], sourcemap: "external" }) ``` And the error logging example copy pasted. I also tried import Bun from "bun", but the same behaviour as described below. I ran bun --watch run bun.js in cli and expected it to work like bun build ./tests.ts --outdir ./dist -- watch. When running the first command, it compiles the code correctly, but the watch mode only affects bun.js, not the files in entrypoints. Is this expected behaviour? Is there another way to activate watch mode? Or am i just misinterpreting the documentation _Originally reported on Discord: [`Watch mode using bundler and not using cli not working as expected`](https://discord.com/channels/876711213126520882/1153973169984655360/1153973169984655360)_
Posted by robobun on Sep 21, 2023, 6:20 PM
Tags
Related issues
- some bike vendor told me that the biggest problem with regular to ebike conversion was that regular bike frames were not strong enough to...
- I think of this as the kiosk economy.
- What a goofy comment.
- There's lots of evidence for positive influences of Caffeine on the body (some negative as well), especially the brain.
- Compose support in WSLc
- [RFC] Roadmap to v2.0
Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments
support (Other)
some bike vendor told me that the biggest problem with regular to ebike conversion was that regular bike frames were not strong enough to...
I think of this as the kiosk economy.
What a goofy comment.
There's lots of evidence for positive influences of Caffeine on the body (some negative as well), especially the brain.
Compose support in WSLc
[RFC] Roadmap to v2.0
[Feature]: Add TurboQuant Support for KV Cache Quantization
Support for AGENTS.md and .agents/skills/, the community has been asking since August 2025
Support `watch: true` in `Bun.build()`
Like the title says, i wanted to run the bundler in watch mode using a js file containing ```js await Bun.build({ entrypoints: ["./test.ts"], outdir: ["./dist"], sourcemap: "external" }) ``` And the error logging example copy pasted. I also tried import Bun from "bun", but the same behaviour as described below. I ran bun --watch run bun.js in cli and expected it to work like bun build ./tests.ts --outdir ./dist -- watch. When running the first command, it compiles the code correctly, but the watch mode only affects bun.js, not the files in entrypoints. Is this expected behaviour? Is there another way to activate watch mode? Or am i just misinterpreting the documentation _Originally reported on Discord: [`Watch mode using bundler and not using cli not working as expected`](https://discord.com/channels/876711213126520882/1153973169984655360/1153973169984655360)_
Comments (0)
No comments yet. Start the discussion.