mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build: properly add pure annotations with tslib (#4819)
Recently with #4787 the tsc generated helpers got replaced with helpers from the `tslib` package. This means that the generated IIFE statements are different than before and the pure annotations RegExps don't work anymore.
This commit is contained in:
committed by
tinayuangao
parent
5c6a6856a1
commit
12d6e968c2
@@ -7,7 +7,7 @@ const classIfeeRegex =
|
||||
|
||||
/** Regex that matches downleveled class IIFE expressions with _extends statements */
|
||||
const classExtendsIfeeRegex =
|
||||
/^(var (\S+) = )(\(function \(_super\) \{[\n\r]* __extends\(\2, _super\);[\n\r]*)/gm;
|
||||
/^(var (\S+) = )(\(function \(_super\) {[\n\r]* tslib.*\.__extends\(\2, _super\);[\n\r]*)/gm;
|
||||
|
||||
/**
|
||||
* Adds `@__PURE__` annotation comments to IIFEs containing ES5-downleveled classes generated by
|
||||
|
||||
Reference in New Issue
Block a user