Skip to content

Commit dba6a27

Browse files
committed
build: properly add pure annotations with tslib
Recently with angular#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.
1 parent 1fce545 commit dba6a27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/gulp/packaging/pure-annotations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const classIfeeRegex =
77

88
/** Regex that matches downleveled class IIFE expressions with _extends statements */
99
const classExtendsIfeeRegex =
10-
/^(var (\S+) = )(\(function \(_super\) \{[\n\r]* __extends\(\2, _super\);[\n\r]*)/gm;
10+
/^(var (\S+) = )(\(function \(_super\) {[\n\r]* tslib.*\.__extends\(\2, _super\);[\n\r]*)/gm;
1111

1212
/**
1313
* Adds `@__PURE__` annotation comments to IIFEs containing ES5-downleveled classes generated by

0 commit comments

Comments
 (0)