Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Active watcher roadmap #281

Open
1 of 5 tasks
pi0 opened this issue Jul 18, 2023 · 13 comments
Open
1 of 5 tasks

Active watcher roadmap #281

pi0 opened this issue Jul 18, 2023 · 13 comments
Labels
discussion enhancement New feature or request

Comments

@pi0
Copy link
Member

pi0 commented Jul 18, 2023

Related: #265, #20

Support unbuild --watch to run rollup in watch mode.

Roadmap:

@jbaubree
Copy link

@pi0 can't wait to get this feature 👍

@joemckenney
Copy link
Contributor

@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.

@AbhiPrasad
Copy link

Any appetite to this? Would you accept PRs for this change? Should we expose all of rollup watch config (delay, include, exclude)?

@pi0
Copy link
Member Author

pi0 commented Nov 1, 2023

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 🙏🏼 )

@AbhiPrasad
Copy link

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?

@pi0
Copy link
Member Author

pi0 commented Nov 6, 2023

It would simply override stubs i guess (there are alternative ways to build dist: bundle|watch|stub)

@danawoodman
Copy link

dropping in to annoyingly +1 this 😇

@tibineagu
Copy link

@AbhiPrasad fingers crossed that you had a bit of time to work on this 🤞

@jd-solanki
Copy link

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 🤔

@RSS1102
Copy link
Contributor

RSS1102 commented Jan 27, 2024

🤔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().

@joemckenney
Copy link
Contributor

@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.

@Daydreamer-riri
Copy link

Hi , any progress?

@joemckenney
Copy link
Contributor

@Daydreamer-riri give https://www.npmjs.com/package/%40pkg-tools/build a try. It's a simple wrapper around unbuild with some nice additions.

  • active watcher
  • output JS file extensions

@pi0 pi0 changed the title Support active watcher Active watcher roadmap Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

9 participants