Skip to content

fix: move vite from dependencies to devDependencies#152

Merged
smoreinis merged 1 commit intomainfrom
fix/move-vite-to-dev-dependencies
Feb 18, 2026
Merged

fix: move vite from dependencies to devDependencies#152
smoreinis merged 1 commit intomainfrom
fix/move-vite-to-dev-dependencies

Conversation

@smoreinis
Copy link
Collaborator

@smoreinis smoreinis commented Feb 18, 2026

Summary

  • Moves vite from dependencies to devDependencies since it's only used for testing (vitest) and not needed in production

Test plan

  • Run npm run build to confirm production build still works
  • Run npm test to confirm vitest still works

Greptile Summary

Moves vite from dependencies to devDependencies in the agentex-ui package. 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 uses npm ci --omit=dev, so this change will reduce the production Docker image size by excluding Vite and its transitive dependencies (esbuild, rollup, etc.).

  • Moved vite@^7.3.1 from dependencies to devDependencies in package.json
  • Updated package-lock.json to mark vite and all transitive dependencies as dev-only

Confidence Score: 5/5

  • This PR is safe to merge — it correctly recategorizes a build/test tool as a dev dependency with no impact on production behavior.
  • The change is minimal and well-scoped. Vite is only referenced in test configuration (vitest.config.mts) and test files, never in production code or the Next.js build. The Dockerfile already uses --omit=dev, confirming this aligns with the existing production build strategy. The package-lock.json changes are mechanically consistent.
  • No files require special attention.

Important Files Changed

Filename Overview
agentex-ui/package.json Moves vite from dependencies to devDependencies. Correct change since Vite is only used via Vitest for testing and the production build uses Next.js.
agentex-ui/package-lock.json Lock file updated to mark vite and its transitive dependencies (esbuild binaries, rollup, tinyglobby, fsevents, etc.) as 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 ✓]
    end
Loading

Last reviewed commit: 2febac7

Vite is only used for testing (vitest) and was incorrectly placed in
production dependencies. Move it to devDependencies alongside
@vitejs/plugin-react and vitest.
@smoreinis smoreinis requested a review from a team as a code owner February 18, 2026 19:54
@smoreinis smoreinis merged commit d68be0e into main Feb 18, 2026
12 checks passed
@smoreinis smoreinis deleted the fix/move-vite-to-dev-dependencies branch February 18, 2026 20:03
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