Skip to content

How to Deploy your Angular App and Latest Build Tools for JavaScript

How to Deploy your Angular App to Production with Firebase Hosting

How do you deploy an Angular application? According to the Angular documentation:

To deploy your application, you have to compile it, and then host the JavaScript, CSS, and HTML on a web server. Built Angular applications are very portable and can live in any environment or served by any technology, such as Node, Java, .NET, PHP, and many others.

Follow these steps:

  • Install Angular CLI
  • Setup Basic Angular Project
  • Create Firebase Account to Deploy Angular Application
  • Install the Firebase Tools using Firebase CLI
  • Login and Initialize Firebase project using Firebase CLI
  • Create Production Build
  • Deploy your Angular App to Firebase Hosting
  • Finally, it’s deployed on Firebase Server

See all the detailed steps in this article: Deploy Angular 10/9 App to Production with Firebase Hosting

The latest build tools for JavaScript

Let's explore the latest build tools that the JavaScript ecosystem uses today.

Rollup.js

According to the official website:

Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library or application.

Installation
npm install -g rollup
Pros of using Rollup.js

The following are some of the cool features that Rollup offers to JavaScript developers:

  • Fast builds
  • It’s easy to learn and get started with, as well as publish JavaScript packages
  • Code-splitting
  • Less and easier configuration compared to Webpack
  • Perfect for JavaScript libraries
  • Plugins for better builds and customizations, along with custom plugin support
  • It provides a smaller bundle size and produces clean code
  • Provides awesome support for ES Modules

Parcel

According to the official website:

Parcel is a web application bundler, differentiated by its developer experience. It offers blazing fast performance utilizing multicore processing, and requires zero configuration.

Installation
npm install -g parcel-bundler
Features of Parcel
  • Blazingly fast builds
  • Awesome developer experience
  • Zero configuration — just install and get started
  • Plugin support, although you don’t necessarily need plugins
  • Custom plugins support
  • Multi-core processing
  • Support for low-level languages like Rust and anything that compiles to WebAssembly (WASM)
  • Hot Module Replacement (HMR) support out of the box
  • Support for code-splitting out of the box
  • Support for low-level languages like Rust and WASM
  • Support for React and Typescript out of the box

Snowpack

Snowpack is a lightning-fast frontend build tool, designed for the modern web. It is an alternative to heavier, more complex bundlers like webpack or Parcel in your development workflow. Snowpack leverages JavaScript's native module system (known as ESM) to avoid unnecessary work and stay fast no matter how big your project grows.

Installation
npm install --save-dev snowpack
Pros of using Snowpack
  • O(1) build times
  • No bundling in production
  • Lightning-fast builds
  • Hot Module Replacement support
  • Out-of-the-box support for TypeScript, JSX, CSS Modules, and the like
  • Simple tooling
  • App templates for developers

esbuild

An extremely fast JavaScript bundler

Installation
npm install --save-dev esbuild
Features of esbuild
  • Extremely fast builds
  • Loaders for Typescript, JavaScript, and JSON
  • Minification
  • Code-splitting support(Work in Progress)
  • Bundling
  • Tree-Shaking
  • Support for various output formats like CJS, IIFE, and ESM
  • Source map generation
  • Transpilation of JSX and newer JS syntax down to ES6

Find more information in this article: The top latest build tools for JavaScript