I have a Meteor app that requires an NPM package via Meteor.npmRequire
that is provided by meteorhacks:npm
package. The problem is that this package uses latest ES6 features and npmRequire
doesn't, so what I get is
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) ^^^^^
How do I override this behavior? Is it possible to make Meteor.npmRequire
respect ES6 features instead of sticking to ES5 strict mode?