mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
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.
This commit is contained in:
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user