Open pi0 opened 11 months ago
@pi0 can't wait to get this feature 👍
@pi0 would you be open to a non-rollup implementation? If so, happy to contribute. We wrapped unbuild when building our own CLI build tool and implemented an active watcher w/ nodemon. You can see the implementation here. If interested, I'd be happy to implement a more generic/robust version of this in unbuild directly.
Any appetite to this? Would you accept PRs for this change? Should we expose all of rollup watch config (delay, include, exclude)?
We can start by supporting rollup watcher only. I think passing all watcher options should also be okay with some preconfigured defaults. @AbhiPrasad feel free to make a draft PR (preferably with as small changes as possible to allow moving forward quickly 🙏🏼 )
Sounds like a plan - will take a look this weekend. Another q - what should happen when someone tried to do watch mode + stub mode at the same time?
It would simply override stubs i guess (there are alternative ways to build dist: bundle|watch|stub)
dropping in to annoyingly +1 this 😇
@AbhiPrasad fingers crossed that you had a bit of time to work on this 🤞
I started major version of my UI Lib Anu and decided to use unbuild
now but due to missing support for this I'm rolling back to vite + library mode.
When this will be implemented hopefully I'll use unbuild 🤔
🤔I also need this feature.May I ask when it can be pushed forward.
I hope it can support files in a key directory and listen to multiple directories, because when I want to develop plugins, plugins and playgrounds are under the same pwd()
.
@RSS1102 @jd-solanki take a peak at https://github.com/pkg-tools/pkg-tools/tree/main/packages/%40pkg-tools/build.
I took a swing at implementing this in the PR linked above but I've also implemented it in a cleaner manner in the library I'm developing that wraps unbuild.
Hi , any progress?
@Daydreamer-riri give https://www.npmjs.com/package/%40pkg-tools/build a try. It's a simple wrapper around unbuild with some nice additions.
Related: #265, https://github.com/unjs/unbuild/issues/20
Support
unbuild --watch
to run rollup in watch mode.Roadmap:
mjs
andcjs
entries (via #364 thanks to @joemckenney)