mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
2bc3522e16
Previously, ngcc could only handle UMD modules whose wrapper function was implemented as a `ts.ConditionalExpression` (i.e. using a ternary operator). This is the format emitted by popular bundlers, such as Rollup. However, this failed to account for a different format, using `if/else` statements, such as the one [emitted by Webpack][1]. This commit prepares ngcc for supporting different UMD wrapper function formats by decoupling the operation of parsing the wrapper function body to capture the various factory function calls and that of operating on the factory function calls (for example, to read or update their arguments). In a subsequent commit, this will be used to add support for the Webpack format. [1]: https://webpack.js.org/configuration/output/#type-umd
Angular
The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.
Usage information and reference details can be found in Angular documentation.
License: MIT