DEV Community

This Dot Media
This Dot Media

Posted on • Originally published at thisdot.co on

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
Enter fullscreen mode Exit fullscreen mode
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
Enter fullscreen mode Exit fullscreen mode
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
Enter fullscreen mode Exit fullscreen mode
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
Enter fullscreen mode Exit fullscreen mode
Features of esbuild
  • Extremely fast builds
  • Loaders for Typescript, JavaScript, and JSON
  • Minification
  • Code-splitting support
  • 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

This Dot Labs is a modern web consultancy focused on helping companies realize their digital transformation efforts. For expert architectural guidance, training, or consulting in React, Angular, Vue, Web Components, GraphQL, Node, Bazel, or Polymer, visit thisdotlabs.com.

This Dot Media is focused on creating an inclusive and educational web for all. We keep you up to date with advancements in the modern web through events, podcasts, and free content. To learn, visit thisdot.co.

Top comments (0)