Use custom build output folder when using create-react-app

后端 未结 13 929
被撕碎了的回忆
被撕碎了的回忆 2020-12-04 17:24

Facebook provides a create-react-app command to build react apps. When we run npm run build, we see output in /build folder.

13条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-04 18:04

    I had the scenario like want to rename the folder and change the build output location, and used below code in the package.json with the latest version

    "build": "react-scripts build && mv build ../my_bundles"
    

提交回复
热议问题