Skip to content
/ viject Public

A tool for migrating your React app from react-scripts (Create React App) to Vite

License

Notifications You must be signed in to change notification settings

bhbs/viject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ea2c4df Β· Feb 15, 2025
Feb 15, 2025
Apr 17, 2023
Sep 25, 2022
Jul 11, 2024
Jun 2, 2024
Jun 2, 2024
Jul 11, 2024
Jul 11, 2024
Jan 17, 2024
Mar 12, 2023
Feb 25, 2023
Sep 16, 2023
Aug 29, 2023
Nov 18, 2023
Feb 15, 2025
Feb 15, 2025
Feb 25, 2023
Sep 25, 2022

Repository files navigation

Viject ⚑

A tool for migrating your React app from react-scripts (Create React App) to Vite

Usage

node compatibility
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

  1. Rewrite npm scripts
  2. Add dependencies
  3. Rewrite react-app-env.d.ts
  4. Move index.html
  5. Transform .js files including JSX into .jsx
  6. 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