Skip to content

Conversation

kevinmarrec
Copy link

Description

Introduce the syncMode option to control the behavior of generating files.

Default to default

  • append: only append the new components to the existing files.
  • overwrite: overwrite the whole existing files with the current components.
  • default: use append strategy when using dev server, overwrite strategy when using build.

Linked Issues

Resolves #804 (Please confirm ⚠️)

Linked Pull Requests

Closes #844

Additional context

Current logic is removeUnused === !this._server, which means only remove unused components when building and is dependent on vite mode ("Is there a dev server ?").

To prevent any breaking change, a default mode is required to follow current behavior, while append mode will always append which means also append with vite build.

Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@kevinmarrec kevinmarrec marked this pull request as ready for review September 12, 2025 15:47
@kevinmarrec kevinmarrec requested a review from antfu as a code owner September 12, 2025 15:47
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.

Why keeping unused?
1 participant