我在尝试使用 Google Cloud Storage 和自定义域名部署 React 网站时遇到问题。
npm run build
在本地构建我的 React 应用。runtime: nodejs10
handlers:
- url: /
static_files: build/index.html
upload: build/index.html
- url: /
static_dir: build
gsutil rsync -r gs://www.example.com ./example
cd ./example
gcloud app deploy
https://example-dot-projectname.uc.r.appspot.com
网址上运行良好Loading failed for the <script> with source "http://www.mycustomdomain.com/static.js/###.chunk.js"
两次gsutil web set -m build/index.html gs://www.example.com
,但没有奏效。有什么想法吗?