cra-to-vite ⚡️

Motivation

I wanted fast development workflow in create react app and Vite seems to solve the issue.

Vite expects react components filename to have extension jsx which can be time consuming to do manually. I created this tool to automatically convert .js files to .jsx, adds all dependencies and config file.

Demo

cra-to-vite-final

Install

npm i -g cra-to-vite

Usage

cra-to-vite

Or

If not installed globally use npx

npx cra-to-vite

Generated scripts

For development

yarn vite:start

For Build

yarn vite:build

Features Supported

  • Adds config based on react version
  • Add dev dependencies
  • File conversion
  • Moving html to root
  • Absolute path support ( Coming soon )

Performance

Converted ~140 files in less than a minute.