|
1 | 1 | /**
|
2 |
| - * Script that runs after node modules have been installed, and NGCC processed all packages. |
3 |
| - * This script updates the `package.json` files of `@angular` framework packages to point |
4 |
| - * to the NGCC processed UMD bundles. This is needed because we run Angular in a `nodejs_binary`, |
5 |
| - * but want to make sure that Ivy is being used. By default, the NodeJS module resolution will |
6 |
| - * load the unprocessed UMD bundle, so we update the `main` field in `package.json` files to point |
7 |
| - * to the Ivy UMD bundles. |
| 2 | + * Script that runs after node modules have been installed, and Ngcc processed all packages. |
| 3 | + * This script updates the `package.json` files of Angular framework packages to point to the |
| 4 | + * Ngcc processed UMD bundles. This is needed because we run Angular in a `nodejs_binary`, but |
| 5 | + * want to make sure that Ivy is being used. By default, the NodeJS module resolution will load |
| 6 | + * the unprocessed UMD bundle because the `main` field of the `package.json` files point to the |
| 7 | + * View Engine UMD bundles. This script updates the `main` field in `package.json` files to point |
| 8 | + * to the previously generated Ivy UMD bundles. |
| 9 | + * |
| 10 | + * Ngcc does not by edit the `main` field because we ran it with the `--create-ivy-entry-points` |
| 11 | + * flag. It instructs Ngcc to not modify existing package bundles, but rather create separate |
| 12 | + * copies with the needed Ivy modifications. This is necessary because the original bundles |
| 13 | + * are needed for View Engine, and we want to preserve them in order to be able to switch |
| 14 | + * between Ivy and View Engine (for testing). Since the goal of this flag is to not modify |
| 15 | + * any original package files/bundles, Ngcc will not edit the `main` field to point to |
| 16 | + * the processed Ivy bundles. |
8 | 17 | */
|
9 | 18 |
|
10 | 19 | const shelljs = require('shelljs');
|
|
0 commit comments