Skip to content

Conversation

@SutuSebastian
Copy link
Collaborator

@SutuSebastian SutuSebastian commented Dec 8, 2025

Summary by CodeRabbit

  • Refactor
    • Optimized plugin startup across bundlers to improve development startup performance.
    • Build now runs conditionally when minification/build flags are set; dev mode starts without an unconditional pre-build, reducing unnecessary build overhead.
  • Chores
    • Added a patch changeset noting removal of a redundant build CLI invocation.

✏️ Tip: You can customize this high-level summary in your review settings.

@SutuSebastian SutuSebastian self-assigned this Dec 8, 2025
@SutuSebastian SutuSebastian added the 🚀 enhancement New feature or request label Dec 8, 2025
@changeset-bot
Copy link

changeset-bot bot commented Dec 8, 2025

🦋 Changeset detected

Latest commit: 3b80e28

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
flowbite-react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Dec 8, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
flowbite-react Ready Ready Preview Comment Dec 8, 2025 1:59pm
flowbite-react-storybook Ready Ready Preview Comment Dec 8, 2025 1:59pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 8, 2025

Walkthrough

The changes remove unconditional initial build() calls from several UI bundler plugins and adjust build vs. dev logic so plugins either run dev() directly or run build() only when a minify/production flag is set.

Changes

Cohort / File(s) Summary
Minify-based build/dev condition
packages/ui/src/plugin/bun.ts, packages/ui/src/plugin/esbuild.ts
Removed unconditional initial build() on startup; inverted branching so build() runs only when a minify flag is truthy, otherwise dev() is invoked.
Removed pre-dev build calls
packages/ui/src/plugin/modernjs.ts, packages/ui/src/plugin/parcel.ts, packages/ui/src/plugin/rspack.ts
Removed pre-dev build() invocations from hooks/events (e.g., beforeDev, watchStart, first dev run)—plugins now call dev() directly without a preceding build.
Release metadata
.changeset/slimy-news-poke.md, package.json
Adds a changeset noting a patch bump for flowbite-react and documents removal of redundant build CLI invocation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Changes are homogeneous across multiple plugin files (removal of initial builds and minor condition inversion).
  • Pay extra attention to:
    • packages/ui/src/plugin/esbuild.ts — ensure initialOptions.minify semantics align with build-time expectations.
    • packages/ui/src/plugin/bun.ts — confirm config.minify source and truthiness handling.
    • Plugin lifecycle hooks (beforeDev, watchStart, dev startup) to ensure no race conditions or missing artifacts.

Suggested labels

:bug: bug

Suggested reviewers

  • rluders

Poem

🐰 I hopped through code at break of day,

Removed a build that ran away.
Now dev starts swift, no extra chore,
Minify decides what builds restore.
Hooray for speed — I bounce some more! 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change across all modified plugin files—removing redundant build CLI invocations that were being executed unconditionally at startup before dev/watch operations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/plugins

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bbb4049 and 3b80e28.

📒 Files selected for processing (1)
  • .changeset/slimy-news-poke.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .changeset/slimy-news-poke.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: 🧰 Build

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@SutuSebastian SutuSebastian merged commit 7ae1bb7 into main Dec 8, 2025
8 checks passed
@SutuSebastian SutuSebastian deleted the refactor/plugins branch December 8, 2025 14:12
@github-actions github-actions bot mentioned this pull request Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚀 enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants