Socket
Socket
Sign inDemoInstall

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.


Version published
Weekly downloads
3
decreased by-99.18%
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 16 Mar 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