Skip to content

Commit 5874247

Browse files
devversionAndrewKushnir
authored andcommitted
build(docs-infra): examples should not run ngcc for all formats (angular#28984)
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 angular#28984
1 parent d207c48 commit 5874247

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

aio/tools/examples/example-boilerplate.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,12 @@ class ExampleBoilerPlate {
104104
}
105105

106106
if (ivy) {
107-
shelljs.exec(`yarn --cwd ${SHARED_PATH} ivy-ngcc`);
107+
// We only need the "fesm5" bundles as the CLI webpack build does not need
108+
// any other formats for building and serving. Ngcc currently only updates
109+
// the module typings if we specified an "es2015" format. This means that
110+
// we also need to build with "fesm2015" in order to get updated typings
111+
// which are needed for compilation.
112+
shelljs.exec(`yarn --cwd ${SHARED_PATH} ivy-ngcc --formats fesm2015 fesm5`);
108113
}
109114

110115
exampleFolders.forEach(exampleFolder => {

0 commit comments

Comments
 (0)