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

feat: experimental active watcher for rollup #364

Merged
merged 10 commits into from
Jun 4, 2024

Conversation

joemckenney
Copy link
Contributor

@joemckenney joemckenney commented Jan 24, 2024

πŸ”— Linked issue

#281

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • [] πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Begins work to progress #281.

+ Adds a watch flag to the CLI
+ Adds a watch configuration object to the BuildConfig, proxying Rollup's watch configuration
+ Utilizes rollup.watch to rebuilds your bundle(s) on changes
+ Add basic logging

Open Items/Questions

  • Disable and/or ignore stub when watch provided given that these "modes" should be mutually exclusive
  • Clean up the build() functions interface (devMode feels sloppy)
  • Choose a better strategy for logging what will be rebuilt (using the rollupOptions is limiting)
  • Potentially make watch even more rollup-build specific

Note I've tagged this WIP as I still want to iterate on the build interface and logging. Putting this up to get feedback about wether this is directionally correct. I'll update docs and complete any other checklist items once I remove the WIP label.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@joemckenney joemckenney marked this pull request as draft January 24, 2024 01:12
@pi0 pi0 changed the title [WIP] feat: add support for an active watcher feat: experimental active watcher Jun 4, 2024
@pi0 pi0 mentioned this pull request Jun 4, 2024
5 tasks
@pi0
Copy link
Member

pi0 commented Jun 4, 2024

Thanks for the PR dear @joemckenney ❀️

In order to progress I've made a few changes mainly to move the watch logic to each builder kind.

I also agree we should find better way of setting build mode but perhaps we can iterate over that too.

@pi0 pi0 marked this pull request as ready for review June 4, 2024 22:11
@pi0 pi0 changed the title feat: experimental active watcher feat: experimental active watcher for rollup Jun 4, 2024
@pi0 pi0 merged commit 2a3f908 into unjs:main Jun 4, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants