3

When i had create my project i didn't know abuot create-react-app, but it's really good tool to reduce time that i've spending on webpack support.

Is there a way to migrate whole project to CRA?

  • 1
    You could create a new CRA project and just copy all your components and other config files across. I don't believe there is a way to migrate to it automatically because there are an infinite number of ways you can set up a project. – JMadelaine Jul 03 '20 at 07:28

1 Answers1

1

First of all, you need a plan to migrate. As i see, easiest way to migrate it's create new project with create-react-app and just paste your project src to the new place.

But there is figuring out few questions that you need to be ready to handle:

  1. Is your test wrote on jest? If not, you need to migrate them.
  2. Are in your project imports written in commajs style or es6 (import or require)? You need es6 style.
  3. Are you using npm or yarn? CRA recommends yarn.
PasVV
  • 564
  • 3
  • 11