Angular Deploy: Docs are incorrect about how to deploy C3 created Angular pages app using GIT.

I noticed that when you create an angular app using C3 it will default to using SSR. It will create package.json scripts that will be used to deploy, start, etc. The deploy from the CLI will work fine bc it calls the script that use: "npm run pages:build && wrangler pages deploy dist/cloudflare". That will call the tools needed to package up the build into the dist/cloudflare and push it up live and everything is happy. However, if you follow the docs for git setup and choose "Angular CLI" (as it states here: https://developers.cloudflare.com/pages/framework-guides/deploy-an-angular-site/#deploy-via-the-cloudflare-dashboard) it will use "npx ng build --configuration production" as the default build command. As you can see that command will NOT call the tools to package things up into the dist/couldflare and the GIT build will fail saying dist/cloudflare folder is missing. The easy fix would be to change the build command for Angular to "npm run pages:build" and that would call the correct commands. However, I'm not sure if I did something wrong or if this is intended behaviour? Thanks!
Cloudflare Docs
Deploy an Angular site · Cloudflare Pages docs
Angular is an incredibly popular framework for building reactive and powerful front-end applications.
1 Reply
jdgamble555
jdgamble5554mo ago
The docs are wrong and need to be updated npm run pages:build shoudl work