我有一个 Meteor 应用程序,该应用程序需要通过packageMeteor.npmRequire
提供的 NPMmeteorhacks:npm
包。问题是这个包使用了最新的 ES6 特性并且npmRequire
没有,所以我得到的是
Exception while invoking method 'fetchSomething' SyntaxError: Use of const in strict mode.
(STDERR)
(STDERR) /Users/rishatmuhametshin/bankathon/controller/packages/npm-container/.npm/package/node
(STDERR) const Stringify = require('./stringify');
(STDERR) ^^^^^
如何覆盖此行为?是否可以Meteor.npmRequire
尊重 ES6 特性而不是坚持 ES5 严格模式?