From f7f36bb758afa982d4df98e03e45a7eb40b28a1f Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 2 Jul 2019 15:30:00 -0400 Subject: [PATCH] Use default parser for Reify Module.prototype._compile hook. This saves us from having to install @babel/parser in the server bundle. There is currently a bug in Reify that prevents it from loading this parser by default, but we can work around that on the Meteor side for now. --- tools/static-assets/server/runtime.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/static-assets/server/runtime.js b/tools/static-assets/server/runtime.js index 22bd9a92a8..f824dceb8c 100644 --- a/tools/static-assets/server/runtime.js +++ b/tools/static-assets/server/runtime.js @@ -24,12 +24,12 @@ Mp.dynamicImport = function (id) { return resolved.then(() => require(id)); }; -const babelParse = require("reify/lib/parsers/babel").parse; +const parse = require("reify/lib/parsers/default").parse; const reifyCompile = require("reify/lib/compiler").compile; const _compile = Mp._compile; Mp._compile = function (content, filename) { const result = reifyCompile(content, { - parse: babelParse, + parse: parse, generateLetDeclarations: false, ast: false, });