Skip to content

fix(cli): fall back to NAPI when plugins are present in vite config - #1213

Merged
fengmk2 merged 3 commits into
voidzero-dev:mainfrom
kazupon:fix/1211
Mar 30, 2026
Merged

fengmk2 merged 3 commits into
voidzero-dev:mainfrom
kazupon:fix/1211

Conversation

@kazupon

@kazupon kazupon commented Mar 30, 2026

Copy link
Copy Markdown
Collaborator

resolve #1211

When a Vite plugin adds run.tasks via the config hook, VitePlusConfigLoader was skipping the NAPI-based resolveConfig(), because the static analyzer found no run field and returned None immediately, without ever executing plugin hooks.

Fix by checking for plugins before run: if plugins are present, always fall back to NAPI so that Vite's resolveConfig() runs plugin config hooks. When no plugins are present, static analysis results remain trustworthy and the fast path is preserved.

@netlify

netlify Bot commented Mar 30, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 106d971
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69ca434706b36f0008b5232d

@kazupon
kazupon requested a review from fengmk2 March 30, 2026 07:48

@fengmk2 fengmk2 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

cc @branchseer

@fengmk2
fengmk2 merged commit 785fac9 into voidzero-dev:main Mar 30, 2026
32 checks passed
@kazupon
kazupon deleted the fix/1211 branch March 30, 2026 09:54
fengmk2 added a commit that referenced this pull request Mar 30, 2026
graphite-app Bot pushed a commit that referenced this pull request Mar 30, 2026
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.

Plugin config hook tasks are silently ignored by vp run

2 participants