How to run build version using create-react-app?

前端 未结 3 1360
一个人的身影
一个人的身影 2021-02-05 00:38

So, I developed a small React application using create-react-app. (I have always made applications from scratch.)

Then, after I was kind of happy with it, I decided to r

3条回答
  •  故里飘歌
    2021-02-05 01:19

    Navigate inside the directory of your app first.

    According to the official create-react-app website. When you run npm run build you create a build directory with a production build of your app.

    After running the command above the next thing you can do to check the build version of your app is to to install serve to serve your status site on the port 5000 by default.

    npm install -g serve
    serve -s build
    

    This will copy the link to your clipboard that you can paste in your browser and see the build version of you app.

提交回复
热议问题