Skip to content

1 x eject

Hans Larsen edited this page May 3, 2018 · 1 revision

ng eject

Overview

ng eject ejects your app and output the proper webpack configuration and scripts.

This command uses the same flags as ng build, generating webpack configuration to match those flags.

You can use --force to overwrite existing configurations. You can eject multiple times, to have a dev and prod config for instance, by renaming the ejected configuration and using the --force flag.

Ejecting the CLI

ng eject

Options

aot

--aot

Build using Ahead of Time compilation.

app

--app (aliases: -a) default value: 1st app

Specifies app name to use.

base-href

--base-href (aliases: -bh)

Base url for the application being built.

deploy-url

--deploy-url (aliases: -d)

URL where files will be deployed.

environment

--environment (aliases: -e)

Defines the build environment.

extract-css

--extract-css (aliases: -ec)

Extract css from global styles onto css files instead of js ones.

force

--force default value: false

Overwrite any webpack.config.js and npm scripts already existing.

i18n-file

--i18n-file

Localization file to use for i18n.

i18n-format

--i18n-format

Format of the localization file specified with --i18n-file.

locale

--locale

Locale to use for i18n.

missing-translation

--missing-translation

How to handle missing translations for i18n.

Values: error, warning, ignore

output-hashing

--output-hashing (aliases: -oh) default value:

Define the output filename cache-busting hashing mode. Possible values: none, all, media, bundles

output-path

--output-path (aliases: -op) default value:

Path where output will be placed.

poll

--poll

Enable and define the file watching poll time period (milliseconds) .

progress

--progress (aliases: -pr) default value: true inside TTY, false otherwise

Log progress to the console while building.

sourcemap

--sourcemap (aliases: -sm, sourcemaps)

Output sourcemaps.

target

--target (aliases: -t, -dev, -prod) default value: development

Defines the build target.

vendor-chunk

--vendor-chunk (aliases: -vc) default value: true

Use a separate bundle containing only vendor libraries.

common-chunk

--common-chunk (aliases: -cc) default value: true

Use a separate bundle containing code used across multiple bundles.

verbose

--verbose (aliases: -v) default value: false

Adds more details to output logging.

watch

--watch (aliases: -w)

Run build when files change.

Clone this wiki locally
You can’t perform that action at this time.