Overview
Tareas can be built as a Progressive Web App (PWA) for deployment to web hosting platforms. This guide covers building the application for web deployment.Development Build
For local development with hot-reload:http://localhost:8100.
Alternatively, you can use Angular’s development server:
Production Build
Build the application
Build the Angular application for production:Or using Angular CLI directly:This creates an optimized production build with:
- Minified JavaScript and CSS
- Tree-shaking for smaller bundle sizes
- Ahead-of-Time (AOT) compilation
- Production environment configuration
Locate build output
The production build files are generated in the
www/ directory at the root of your project.Testing the Build Locally
Before deploying, test the production build locally:http://localhost:8080 in your browser to test the production build.
Build Configuration
The build process uses Angular’s build system. You can customize build settings inangular.json.
The production configuration automatically:
- Enables production mode
- Optimizes bundle sizes
- Generates source maps (optional)
- Applies performance budgets
Deployment Options
Once built, deploy the contents of thewww/ directory to:
Static Hosting Platforms
- Netlify: Drag-and-drop the
www/folder or connect your Git repository - Vercel: Deploy with
vercel --prodfrom the project root - Firebase Hosting: Use
firebase deployafter configuring firebase.json - GitHub Pages: Push the
www/contents to agh-pagesbranch - AWS S3: Upload the
www/directory to an S3 bucket with static hosting enabled
Example: Deploy to Netlify
Watch Mode
For development with automatic rebuilds on file changes:ng build --watch --configuration development and rebuilds when source files change.
Troubleshooting
Build Fails with Memory Error
Increase Node.js memory limit:Module Not Found Errors
Ensure all dependencies are installed:Environment Variables Not Applied
Build Size Too Large
Check bundle sizes:Next Steps
Android Deployment
Build and deploy to Android devices
iOS Deployment
Build and deploy to iOS devices