fix: move vite from dependencies to devDependencies#152
Merged
Conversation
Vite is only used for testing (vitest) and was incorrectly placed in production dependencies. Move it to devDependencies alongside @vitejs/plugin-react and vitest.
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
vitefromdependenciestodevDependenciessince it's only used for testing (vitest) and not needed in productionTest plan
npm run buildto confirm production build still worksnpm testto confirm vitest still worksGreptile Summary
Moves
vitefromdependenciestodevDependenciesin theagentex-uipackage. This is a correct categorization since Vite is only used as the engine for Vitest (test runner), while the production build uses Next.js (next build). The Dockerfile already usesnpm ci --omit=dev, so this change will reduce the production Docker image size by excluding Vite and its transitive dependencies (esbuild, rollup, etc.).vite@^7.3.1fromdependenciestodevDependenciesinpackage.jsonpackage-lock.jsonto mark vite and all transitive dependencies as dev-onlyConfidence Score: 5/5
--omit=dev, confirming this aligns with the existing production build strategy. The package-lock.json changes are mechanically consistent.Important Files Changed
vitefromdependenciestodevDependencies. Correct change since Vite is only used via Vitest for testing and the production build uses Next.js.dev: true. Changes are consistent with the package.json update.Flowchart
flowchart TD A[package.json] --> B{Dependency Type?} B -->|dependencies| C[Installed in Production] B -->|devDependencies| D[Excluded from Production] C --> E[npm ci --omit=dev] D --> E E --> F[next build] F --> G[Production Docker Image] subgraph "Before PR" H[vite in dependencies] --> I[Included in prod image unnecessarily] end subgraph "After PR" J[vite in devDependencies] --> K[Excluded from prod image ✓] endLast reviewed commit: 2febac7