[英]How to turn off production build and use development mode in create-react-app?
First I have an app running in development mode, then I created a production build using:首先我有一个在开发模式下运行的应用程序,然后我使用以下方法创建了一个生产版本:
yarn run build
And then served it by using:然后使用:
serve -s build
Everything was working fine.一切正常。 But now I want to go back to development mode.
但现在我想回到开发模式。 How it can be done?
怎么做?
First delete the production code, which is build
folder.首先删除生产代码,也就是
build
文件夹。 if you're running Linux, Mac Os, so run the below command in the project directory,如果您运行的是 Linux、Mac Os,请在项目目录中运行以下命令,
rm -rf build
and now start the development server现在启动开发服务器
yarn run start
or npm run start
yarn run start
或npm run start
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.