Skip to content

Commit 12d6e96

Browse files
devversiontinayuangao
authored andcommitted
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.
1 parent 5c6a685 commit 12d6e96

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)