Big news!Introducing Socket AI - ChatGPT-Powered Threat Analysis. Learn more
Socket
Log inDemoInstall

cra-to-nx

Package Overview
Dependencies
0
Maintainers
6
Versions
349
Issues
File Explorer

Advanced tools

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.1latest
    GitHub

Version published
Maintainers
6
Weekly downloads
1,009
decreased by-63.74%

Weekly downloads

Changelog

Source

15.9.1

15.9.1 (2023-03-30)

Bug Fixes

  • misc: create-nx-workspace errors should display properly (#15988) (5d51ed9)
  • web: add migration for dropped dependencies (#15991) (9723859)

Readme

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

Last updated on 30 Mar 2023

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc