Skip to content

feat(vite-plus): support lazy field in vite-plus config#526

Merged
Brooooooklyn merged 6 commits intomainfrom
02-01-feat_vite-plus_support_lazy_field_in_vite-plus_config
Feb 3, 2026
Merged

feat(vite-plus): support lazy field in vite-plus config#526
Brooooooklyn merged 6 commits intomainfrom
02-01-feat_vite-plus_support_lazy_field_in_vite-plus_config

Conversation

@Brooooooklyn
Copy link
Copy Markdown
Member

@Brooooooklyn Brooooooklyn commented Feb 1, 2026

Note

Medium Risk
Adds new config evaluation behavior that can change when/which plugins are included, and adjusts CLI build output (new CJS artifact) and CI build ordering; mistakes here could break consumer configs or packaging.

Overview
Adds a custom defineConfig wrapper in vite-plus that supports a lazy() field to asynchronously provide additional plugins and merges them with any existing plugins, working for object, promise, and function config forms.

Updates the CLI entrypoints and build to ship define-config for both ESM and CommonJS (emitting define-config.cjs), and adds thorough unit coverage for the new lazy behavior.

Adjusts CI build steps so vite-plus/vite-plus-cli TypeScript builds run earlier, updates the repo vite.config.ts to use defineConfig, and makes small workspace/lint script tweaks.

Written by Cursor Bugbot for commit 2f8417b. This will update automatically on new commits. Configure here.

Copilot AI review requested due to automatic review settings February 1, 2026 10:11
Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ccdd0d83ad

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cli/src/index.ts Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for a lazy field in the vite-plus configuration to enable lazy loading of plugins. The PR modifies the defineConfig function to intercept configurations with a lazy field, execute the lazy loader, and merge the resulting plugins with any existing plugins before passing the config to the underlying vite/vitest configuration system.

Changes:

  • Modified vite.config.ts to use the new defineConfig function instead of type assertion
  • Updated pnpm-workspace.yaml with formatting improvements and added @vitejs/plugin-react to the catalog
  • Implemented lazy plugin loading support in packages/cli/src/index.ts with a custom defineConfig wrapper

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
vite.config.ts Updated to use defineConfig function call instead of type assertion to leverage the new lazy loading feature
pnpm-workspace.yaml Formatting improvements (quote normalization, whitespace consistency), added @vitejs/plugin-react dependency, and alphabetized patchedDependencies entries
packages/cli/src/index.ts Added lazy field to UserConfig interface and implemented custom defineConfig wrapper to handle lazy plugin loading

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/cli/src/index.ts Outdated
Comment thread packages/cli/src/index.ts Outdated
Comment thread packages/cli/src/index.ts Outdated
Comment thread packages/cli/src/index.ts
Comment thread packages/cli/src/index.ts Outdated
@Brooooooklyn Brooooooklyn force-pushed the 02-01-feat_vite-plus_support_lazy_field_in_vite-plus_config branch from ccdd0d8 to 5380304 Compare February 1, 2026 12:38
Comment thread packages/cli/src/index.ts Outdated
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 4 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Comment thread packages/cli/build.ts
Comment thread packages/cli/src/define-config.ts
Comment thread packages/cli/src/define-config.ts
Comment thread packages/cli/src/index.cts
Copy link
Copy Markdown
Member Author

Brooooooklyn commented Feb 3, 2026

Merge activity

  • Feb 3, 7:19 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Feb 3, 7:19 AM UTC: @Brooooooklyn merged this pull request with Graphite.

@Brooooooklyn Brooooooklyn merged commit a21216e into main Feb 3, 2026
32 checks passed
@Brooooooklyn Brooooooklyn deleted the 02-01-feat_vite-plus_support_lazy_field_in_vite-plus_config branch February 3, 2026 07:19
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.

3 participants