Skip to content

feat: serve-only vite plugin mode (translate: false) - #6

Merged
Peyton-Spencer merged 1 commit into
mainfrom
feat/serve-only-plugin-mode
Jul 19, 2026
Merged

feat: serve-only vite plugin mode (translate: false)#6
Peyton-Spencer merged 1 commit into
mainfrom
feat/serve-only-plugin-mode

Conversation

@Peyton-Spencer

Copy link
Copy Markdown
Contributor

Adds translate?: boolean (default true) to the vite plugin config. When false:

  • buildStart is a no-op: no extraction, no AI calls, no file writes
  • model is no longer required (now optional in the config type; validated with a clear error when translation mode runs without it)
  • virtual modules (virtual:solid-translate, /lazy, /locale/<l>) still serve the committed locale JSONs

Motivation: large apps want hermetic, deterministic builds — extraction/translation run exclusively through the CLI (locally or in CI), while dev/preview/prod builds only consume committed locale files. Without this, a stale lock fails the build (by design, post-#3) even in pipelines that should never translate.

Includes tests for both the no-op path and the missing-model error.

🤖 Generated with Claude Code

… builds

The plugin can now serve the virtual translation modules from committed
locale JSON files without extracting, translating, or writing anything.
model becomes optional and is validated only when translation runs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Peyton-Spencer
Peyton-Spencer merged commit 9f86dcf into main Jul 19, 2026
1 check passed
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.

1 participant