Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cra-to-nx

Package Overview
Dependencies
Maintainers
6
Versions
357
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cra-to-nx

This package will turn your React app into an Nx workspace. To use this package, your React app must have been generated and kept the structure of Create-React-App, with files generated either in js/jsx or ts/tsx.

  • 15.9.7
  • previous
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
Maintainers
6
Weekly downloads
 
Created
Source

Migrating CRA to Nx

This package will turn your React app into an Nx workspace with Vite. To use this package, your React app must have been generated and kept the structure of Create-React-App, with files generated either in js/jsx or ts/tsx.

How to use

Go to your CRA React app directory and run the following command:

npx nx init

Nx will automatically detect that you are in a CRA project and add Nx, Vite, and Vitest for you.

Ok, it's done, what do I do now?

Run, build, lint, test

Your previous scripts still work:

# Serve and build app with Vite
npm start
npm run build

# Run unit tests with Vitest
npm test

Generate code

Nx comes with code generators to automate repeatable tasks performed on your code.

Take a look at this guide.

And try generating a library:

nx generate lib ui-button

Courses, guides, docs

Keywords

FAQs

Package last updated on 13 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc