使用 create-react-app 时,React 将连续构建文件放在哪里

Bad*_*ari 7 firebase reactjs firebase-tools create-react-app

我在用着create-react-app。当我运行npm start( react-scripts start) 时,它会不断为我构建更改并发挥神奇作用。但它的输出文件夹是什么?我知道当我手动构建它时文件去了哪里。

我想使用 firebase 模拟器来服务我的所有反应的当前版本(连续构建),但我不明白输出文件夹在哪里或如何实现它。

die*_*edu 4

你可以尝试这个包https://github.com/Nargonath/cra-build-watch

安装它并将脚本添加到 package.json

{
  "scripts": {
    "watch": "cra-build-watch"
  }
}
Run Code Online (Sandbox Code Playgroud)

并运行它

npm run watch

更多信息在这里

https://ibraheem.ca/writings/cra-write-to-disk-in-dev/

如果您转到文章中链接的React repo问题,您会找到更多解决方法