forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(ngcc): make it easy to support more UMD wrapper function for…
…mats 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
- Loading branch information
Showing
3 changed files
with
222 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.