fix(docs-infra): consider all formats when compiling docs examples with `ngcc` (#33206)
Previously, we would only consider the `es2015` property, but some packages (such as `angular-in-memory-web-api`) may not have that. They might still be compilable by `ngcc`, is they have other format properties (e.g. `module` or `main`). This commit fixes potential issues by considering all properties that would be considered via the cli integration and aligns the command to turn on ivy for docs examples with the one used in new cli apps: https://github.com/angular/angular/blob/3e14c2d02/packages/core/schematics/migrations/postinstall-ngcc/index.ts#L22 PR Close #33206
This commit is contained in:
parent
11bf7679a1
commit
31b5db6fa8
|
@ -80,9 +80,7 @@ class ExampleBoilerPlate {
|
|||
}
|
||||
|
||||
if (ivy) {
|
||||
// We only need the "es2015" bundles as the CLI webpack build does not need
|
||||
// any other formats for building and serving.
|
||||
shelljs.exec(`yarn --cwd ${SHARED_PATH} ngcc --properties es2015`);
|
||||
shelljs.exec(`yarn --cwd ${SHARED_PATH} ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points`);
|
||||
}
|
||||
|
||||
exampleFolders.forEach(exampleFolder => {
|
||||
|
|
Loading…
Reference in New Issue