1.0.0 โ€ข Published 11 months ago

cra-jailbreak-vite v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

cra-jailbreak-vite

Break free from Create React App and embrace the speed of Vite! This tool automates the process of converting your Create React App (CRA) projects to Vite.

Features

  • ๐Ÿš€ Quick conversion from CRA to Vite
  • ๐Ÿ”„ Preserves your source code and project structure
  • ๐Ÿงน Cleans up CRA-specific files and configurations
  • ๐Ÿ“ฆ Updates package.json with Vite-specific scripts and dependencies
  • ๐Ÿ› ๏ธ Creates a basic Vite configuration file

Installation

Install the package globally using npm:

npm install -g cra-jailbreak-vite

Usage

Navigate to your Create React App project directory and run:

cra-jailbreak-vite .

This will create a new Vite project in a sibling directory with the suffix "-vite".

Options

  • -o, --output <path>: Specify a custom output directory
    cra-jailbreak-vite . -o ../my-vite-project

After Conversion

After running the tool:

  1. Navigate to the newly created Vite project directory:

    cd ../your-project-name-vite
  2. Install dependencies:

    npm install
  3. Start the Vite dev server:

    npm run dev

What Gets Changed

  • package.json: Updated with Vite scripts and dependencies
  • vite.config.js: Created with basic Vite configuration
  • index.html: Moved to the root and updated for Vite
  • JavaScript/TypeScript files: Renamed to .jsx/.tsx where appropriate
  • Unnecessary CRA-specific files: Removed

Caveats

  • This tool aims to handle most standard CRA setups, but complex or highly customized projects may require additional manual adjustments.
  • Always review the changes and test thoroughly after conversion.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Inspired by the React and Vite communities
  • Built with love for developers seeking faster build times and a more flexible setup

Happy coding, and enjoy your newfound freedom with Vite! ๐ŸŽ‰

1.0.0

11 months ago