Skip to content

follow-up: migrate users toward lazyPlugins to avoid eager plugin side effects #1580

@crusty-voidzero

Description

@crusty-voidzero

Summary

We should follow up on migrating Vite+ users toward lazyPlugins so plugin side effects do not run unexpectedly in long-lived/background processes.

Problem

A persistent Node process in the background ended up running a Vite plugin that touched the file system when it should not have. In the reported case, this happened through oxlint --lsp via VS Code.

That suggests some plugin work currently runs too eagerly, and users need a clearer migration path toward lazyPlugins to avoid side effects in non-build / non-dev execution contexts.

Proposed follow-up

  • Audit current Vite+ guidance around plugin execution timing
  • Document and/or implement the migration path to lazyPlugins
  • Identify common cases where plugin side effects can be triggered unexpectedly (LSP, persistent workers, editor integrations, background tooling)
  • Provide clear recommendations for plugin authors and Vite+ users

Acceptance criteria

  • We have a concrete migration/follow-up plan for lazyPlugins
  • Users have guidance on avoiding eager plugin side effects
  • The oxlint/LSP-style background-process case is covered explicitly

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions