From b345669daa6e1a5db99298f780ea504e93c90d42 Mon Sep 17 00:00:00 2001 From: Chirag Patel Date: Mon, 1 Feb 2021 09:48:12 -0800 Subject: [PATCH] Reexport precompile from babel-plugin-component-templates --- packages/@glimmerx/babel-plugin-component-templates/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/@glimmerx/babel-plugin-component-templates/index.js b/packages/@glimmerx/babel-plugin-component-templates/index.js index 98af8998..a90a0cf0 100644 --- a/packages/@glimmerx/babel-plugin-component-templates/index.js +++ b/packages/@glimmerx/babel-plugin-component-templates/index.js @@ -2,6 +2,7 @@ const glimmerPrecompileTemplate = require('@glimmer/babel-plugin-strict-template .precompileTemplate; const { addNamed } = require('@babel/helper-module-imports'); const { traverse, preprocess } = require('@glimmer/syntax'); +const { precompile } = require('@glimmer/compiler'); /* AST.Node reference: https://github.com/glimmerjs/glimmer-vm/blob/master/packages/%40glimmer/syntax/lib/types/nodes.ts#L268 */ @@ -364,3 +365,5 @@ module.exports = function (babel, options) { }; module.exports.getTemplateTokens = getTemplateTokens; +// Reexport the precompile function from @glimmer/compiler for any other babel plugins so that they have consistent versioning for the compiler +module.exports.precompile = precompile;