$ recombobulate _
home / tips / ask-claude-to-migrate-your-webpack-config-to-vite
81

Ask Claude to Migrate Your Webpack Config to Vite

recombobulate @recombobulate · Mar 26, 2026 · Workflows
ask-claude-to-migrate-your-webpack-config-to-vite

Migrating from Webpack to Vite involves more than renaming config keys — entry points, aliases, environment variable handling, and custom loaders all need translation. Claude can do the heavy lifting.

Convert this webpack.config.js to a Vite config. The project is a 
React TypeScript app. Note anything without a direct Vite equivalent 
and suggest how to handle it.

[paste your webpack.config.js here]

Claude will produce a vite.config.ts with the correct plugins (@vitejs/plugin-react, vite-tsconfig-paths), translated resolve.alias entries, and a mapped define block for environment variables. For custom Webpack loaders — like raw-loader or @svgr/webpack — it will suggest the equivalent Vite plugin or a minimal inline workaround.

It'll also flag the things Vite handles differently from Webpack:

// Webpack: process.env.REACT_APP_API_URL
// Vite:    import.meta.env.VITE_API_URL
// Claude will tell you to update your source files too

Claude explains which .env variable prefix changes are required across your source files, so you don't end up with silent undefined values after the migration.

Follow up with "write a vitest.config.ts that reuses the same aliases" to complete the toolchain switch in one go.

Webpack-to-Vite migrations are tedious but mechanical — exactly the kind of task Claude excels at.

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Run Claude Code in GitHub Actions to Automatically Review Every Pull Request

Set up Claude Code as an automated reviewer in your CI pipeline — on every pull request, it reads the diff, checks for bugs, security issues, missing tests, and convention violations, then posts its findings as a PR comment. Your human reviewers get a head start because the obvious issues are already flagged before they look.

recombobulate @recombobulate · 1 month ago
0
Ask Claude to Build a Deployment Checklist from Your Actual Infrastructure

Before deploying, tell Claude to read your project — migrations, environment variables, queue workers, scheduled tasks, caching, third-party integrations — and generate a deployment checklist that's specific to your app. Not a generic "did you run migrations?" list, but one that knows YOUR infrastructure and catches the things YOUR deploy can break.

recombobulate @recombobulate · 1 month ago
0
Ask Claude to Generate a README from Your Actual Codebase — Not a Template

Instead of writing a README from memory or copying a template, tell Claude to read your project and generate one that's actually accurate — real setup instructions from your config, real architecture from your directory structure, real API examples from your routes, and real prerequisites from your dependency files.

recombobulate @recombobulate · 1 month ago