ANGULAR 20.3 PROJECT DEPLOYMENT IN AZURE
ANGULAR 20.3 PROJECT DEPLOYMENT IN AZURE
Where are the app folder files being stored in dist?
Angular 20.3 Build Output
When you run:
ng build --configuration production
Angular compiles your application into static files.
Suppose your project structure is:
PropelFeb2026-emsv26 │ ├── src │ ├── app │ ├── assets │ ├── environments │ ├── index.html │ └── styles.css │ ├── angular.json └── package.json
After building, Angular creates:
dist └── PropelFeb2026-emsv26 └── browser ├── index.html ├── favicon.ico ├── assets │ ├── images │ └── ... ├── main-5PJWDBGG.js ├── polyfills-xxxxx.js ├── styles-YN5TJYO7.css └── ...
Where is the app Folder?
Notice there is no app folder.
Why?
Because Angular compiles all of your TypeScript files into optimized JavaScript bundles.
For example:
Before Build
src └── app ├── app.component.ts ├── app.component.html ├── app.routes.ts ├── employee │ ├── employee-list.component.ts │ ├── employee-add.component.ts │ └── ... └── services └── employee.service.ts
After Build
Everything is bundled into files like:
main-5PJWDBGG.js
This file contains:
- AppComponent
- EmployeeComponent
- Services
- Pipes
- Routing
- Models
- Components
Everything is compiled together and optimized.
What Happens to HTML?
Example:
employee-list.component.html
gets compiled into JavaScript templates inside:
main-5PJWDBGG.js
What Happens to TypeScript?
Example:
employee.service.ts
becomes JavaScript inside:
main-5PJWDBGG.js
What Happens to CSS?
Global CSS
src/styles.css
becomes
styles-YN5TJYO7.css
Component CSS is also bundled and optimized.
What Happens to Images?
Images under:
src/assets
remain as:
assets/
because Angular copies the assets folder directly.
Build Process Diagram
src │ ├── app ├── assets ├── styles.css ├── index.html │ │ │ ng build --configuration production ▼ dist │ └── PropelFeb2026-emsv26 │ └── browser │ ├── index.html ├── assets ├── main-xxxxx.js ├── styles-xxxxx.css ├── polyfills.js └── runtime.js (if generated)
Why Does Angular Bundle Everything?
Because it provides:
- Faster loading
- Smaller file sizes
- Minification
- Tree shaking (unused code removed)
- Better browser performance
- Optimized caching
Where Are the Files Stored in Azure?
After deployment, the contents of your browser folder are copied to:
Azure App Service └── site └── wwwroot ├── index.html ├── main-xxxxx.js ├── styles-xxxxx.css ├── assets └── web.config (if included)
This is exactly what you saw in Kudu.
Flow of CI/CD
Developer │ ▼ Git Push │ ▼ Azure Repos │ ▼ Build Pipeline │ ▼ ng build --configuration production │ ▼ dist └── PropelFeb2026-emsv26 └── browser │ ▼ Archive (ZIP) │ ▼ Publish Artifact │ ▼ Release Pipeline │ ▼ Azure App Service │ ▼ site/wwwroot │ ▼ Website
This deployment journey is an excellent example of troubleshooting:
- Create an Angular project.
- Push it to Azure Repos.
- Build it with Azure Pipelines.
- Deploy it to Azure App Service.
- Show the initial deployment issue caused by packaging the wrong folder.
-
Use Kudu to inspect
site/wwwroot. -
Correct the archive path to the
browserfolder. - Redeploy and demonstrate the successful result.
Comments
Post a Comment