I'm trying to deploy my React project to Production and it seems that Google App Engine is building the development rather than the Production Build folder. Perhaps I'm missing something very simple...
I first run the "npm run build", then I run "npm run deploy" or "gcloud app deploy app.yaml --project [project_name]"
Folder Structure: here is my app.yaml file
runtime: nodejs
env: flex
env_variables:
APP_ENV: "production"
handlers:
- url: /
static_files: build/index.html
upload: build/index.html
- url: /
static_dir: build
- url: /static
static_dir: build/static
automatic_scaling:
min_num_instances: 2
max_num_instances: 4
cool_down_period_sec: 180
cpu_utilization:
target_utilization: 0.50
resources:
cpu: 1
memory_gb: 3.5
disk_size_gb: 10
Here is my package.json:
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"deploy": "gcloud app deploy app.yaml --project ....",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
When it finish deploying, I still the development warnings and when I run page speed - the js files arent minified/ optimized. What am I missing?