Skip to content

The Angular Runtime allows Angular to run on Netlify with zero configuration

License

Notifications You must be signed in to change notification settings

netlify/angular-runtime

Repository files navigation

Netlify Build plugin Angular Serverless – Run Angular Universal seamlessly on Netlify

Essential Angular Serverless Plugin

This build plugin is a utility for supporting Angular Universal on Netlify. This plugin should be installed by running a Netlify-specific Angular schematic.

Table of Contents

Installation and Configuration

Angular Schematic

ng add netlify-schematics
ng generate netlify-schematics:netlify-serverless`

The schematic commands will create a netlify.toml in the root of your project, if it doesn't already exist. Your file should include the correct build command, publish directory, and plugins section below. Note: the build command requires you to include your custom project name (as indicated in your angular.json) where designated below:

[build]
  command = "ng build --configuration production && ng run {projectName}:serverless:production"
  publish = "dist/netlify-serverless/browser"

[[plugins]]
  package = "@netlify/plugin-angular-serverless"