Repository navigation
docs(skills): run the CI dev server in production mode - #28
Merged
Merged
Conversation
- ci-setup: add dev:ci (NODE_ENV=production vite) for every Vite project and start the workflows with it - ci-setup: istanbul gets checkProd: false so coverage stays on there; never forceBuildInstrument, which instruments vite build - ci-setup: skip production mode when TWD loads from an initTWD block behind import.meta.env.DEV - bump plugin to 1.3.6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TWD runs against the dev server. In CI, starting it with
NODE_ENV=productionmakes Vite serve the framework's production build (for React: no StrictMode double render, no dev-only checks). On a 322-test React app: 258s → 133s, same coverage.Local development and the AI flow (agent ↔ twd-relay / twd-cli on
npm run dev) are unchanged. This only touches what/twd:ci-setupgenerates.Changes
dev:cifor every Vite project:NODE_ENV=production vite, orCI=true NODE_ENV=production vitewith coverage. It copies any flags fromdev. The test, custom and recording workflows start the server with it.checkProd: false, so coverage stays on in production mode. The plugin still applies only tovite serve, sovite buildnever instruments. The skill forbidsforceBuildInstrument: true, which instrumentsvite buildtoo, and offers to replace it if a project already has it.import.meta.env.DEVisfalse, even onvite serve. Thetwd()plugin (apply: 'serve') still loads, but aninitTWD(block behindimport.meta.env.DEVdoes not. The skill now detects that case, skips production mode, and suggests/twd:setup.dev:ci+test:cilocally once.