Remove no longer needed #__PURE__ annotations for taggedTemplateLiteral helper (#7914)

* Remove pure comment annotation

* Update outputs
This commit is contained in:
Dennis Czombera
2018-05-12 15:19:33 +02:00
committed by Mateusz Burzyński
parent b87c43d894
commit 040ba2bf53
9 changed files with 29 additions and 34 deletions

View File

@@ -1,5 +1,4 @@
import { declare } from "@babel/helper-plugin-utils";
import annotateAsPure from "@babel/helper-annotate-as-pure";
import { template, types as t } from "@babel/core";
export default declare((api, options) => {
@@ -83,13 +82,9 @@ export default declare((api, options) => {
callExpressionInput.push(t.arrayExpression(raws));
}
const callExpression = t.callExpression(helperId, callExpressionInput);
annotateAsPure(callExpression);
callExpression._compact = true;
const lazyLoad = template.ast`
function ${templateObject}() {
const data = ${callExpression};
const data = ${t.callExpression(helperId, callExpressionInput)};
${templateObject} = function() { return data };
return data;
}