From 3baa74449cac2643bd8c370816253449e6d7f47e Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Tue, 26 Feb 2019 20:15:52 +0100 Subject: [PATCH] build(docs-infra): examples should not run ngcc for all formats (#29046) Currently when adding the example boilerplate to all examples with Ivy enabled, we run Ngcc and transform all found formats. This potentially slows down the build and is not necessary as we only need the "fesm5" and "fesm2015" bundles. PR Close #29046 --- aio/tools/examples/example-boilerplate.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/aio/tools/examples/example-boilerplate.js b/aio/tools/examples/example-boilerplate.js index 53fecd1d2a..ae93648335 100644 --- a/aio/tools/examples/example-boilerplate.js +++ b/aio/tools/examples/example-boilerplate.js @@ -104,7 +104,12 @@ class ExampleBoilerPlate { } if (ivy) { - shelljs.exec(`yarn --cwd ${SHARED_PATH} ivy-ngcc`); + // We only need the "fesm5" bundles as the CLI webpack build does not need + // any other formats for building and serving. Ngcc currently only updates + // the module typings if we specified an "es2015" format. This means that + // we also need to build with "fesm2015" in order to get updated typings + // which are needed for compilation. + shelljs.exec(`yarn --cwd ${SHARED_PATH} ivy-ngcc --formats fesm2015 fesm5`); } exampleFolders.forEach(exampleFolder => {