From df71aa425fef1b58337166d88a7393214bc3fd38 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 21 Nov 2019 14:56:54 +0100 Subject: [PATCH] docs: clarify that `--prod` should be used to publish a library (#33959) PR Close #33959 --- aio/content/guide/creating-libraries.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/aio/content/guide/creating-libraries.md b/aio/content/guide/creating-libraries.md index 95c2af6d59..c8fbe0cca4 100644 --- a/aio/content/guide/creating-libraries.md +++ b/aio/content/guide/creating-libraries.md @@ -109,11 +109,10 @@ To learn more, see [Schematics Overview](guide/schematics) and [Schematics for ## Publishing your library -Use the Angular CLI and the npm package manager to build and publish your library as an npm package. -Libraries are built in [AoT mode](guide/aot-compiler) by default, so you do not need to specify the `-prod` flag when building for publication. +Use the Angular CLI and the npm package manager to build and publish your library as an npm package. It is not recommended to publish Ivy libraries to NPM repositories. Before publishing a library to NPM, build it using the `--prod` flag which will use the older compiler and runtime known as View Engine instead of Ivy. -ng build my-lib +ng build my-lib --prod cd dist/my-lib npm publish