feat(ngcc): support for new APF where module
points to esm2015 output (#36944)
As of version 10, libraries following the APF will no longer contain ESM5 output. Hence, tests in ngcc need to be updated as they currently rely on the release output of `@angular/core`. Additionally, we'd need to support in ngcc that the `module` property of entry-points no longer necessarily refers to `esm5` output, but instead can also target `esm2015`. We currently achieve this by checking the path the `module` property points to. We can do this because as per APF, the folder name is known for the esm2015 output. Long-term for more coverage, we want to sniff the format by looking for known ES2015 constructs in the file `module` refers to. PR Close #36944
This commit is contained in:

committed by
Alex Rickabaugh

parent
d5293d2aa3
commit
c98a4d6ddd
@ -27,7 +27,7 @@ export function parseCommandLineOptions(args: string[]): NgccOptions {
|
||||
alias: 'properties',
|
||||
array: true,
|
||||
describe:
|
||||
'An array of names of properties in package.json to compile (e.g. `module` or `es2015`)\n' +
|
||||
'An array of names of properties in package.json to compile (e.g. `module` or `main`)\n' +
|
||||
'Each of these properties should hold the path to a bundle-format.\n' +
|
||||
'If provided, only the specified properties are considered for processing.\n' +
|
||||
'If not provided, all the supported format properties (e.g. fesm2015, fesm5, es2015, esm2015, esm5, main, module) in the package.json are considered.'
|
||||
@ -136,4 +136,4 @@ export function parseCommandLineOptions(args: string[]): NgccOptions {
|
||||
errorOnFailedEntryPoint,
|
||||
tsConfigPath
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user