Skip to content

Commit

Permalink
build: properly add pure annotations with tslib (#4819)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
devversion authored and tinayuangao committed May 26, 2017
1 parent 5c6a685 commit 12d6e96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/gulp/packaging/pure-annotations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 12d6e96

Please sign in to comment.