Viject âĄ
A tool for migrating your React app from react-scripts (Create React App) to Vite
Usage
cd <YOUR_APP>
npx viject
Concept
Enables one-shot migration from CRA to Vite. Differences are absorbed in vite.config, allowing for a gradual migration with minimal changes.
See more details in doc
How it works
- Rewrite npm scripts
- Add dependencies
- Rewrite
react-app-env.d.ts
- Move
index.html
- Transform
.js
files including JSX into .jsx
- Add
vite.config.(js|ts)
includes plugins for CRA compatibility
Supported features
- đ˘ Using HTTPS in Development
Styles and Assets
Build
Testing
https://vitest.dev/guide/migration.html
Back-End Integration
Advanced Configuration
https://create-react-app.dev/docs/advanced-configuration
- đ˘ BROWSER
- đĄ BROWSER_ARGS
- đ˘ HOST
- đ˘ PORT
- đ˘ HTTPS
- đŤ WDS_SOCKET_HOST
- đŤ WDS_SOCKET_PATH
- đŤ WDS_SOCKET_PORT
- đ˘ PUBLIC_URL
- đ˘ BUILD_PATH
- đŤ CI
- đŤ REACT_EDITOR
- đŤ CHOKIDAR_USEPOLLING
- đ˘ GENERATE_SOURCEMAP
- đĄ INLINE_RUNTIME_CHUNK
- đĄ IMAGE_INLINE_SIZE_LIMIT
- đ˘ FAST_REFRESH
- đĄ TSC_COMPILE_ON_ERROR
- đĄ ESLINT_NO_DEV_ERRORS
- đĄ DISABLE_ESLINT_PLUGIN
- đŤ DISABLE_NEW_JSX_TRANSFORM
Contribution
See Contributing Guide
License
MIT