When using the let keyword in a .jsx file, running a meteor build breaks on the minification step:
let name = 'whatever';
> meteor build ../sif --server http://thing.com:80
=> Babel active on file extensions: es6.js. \
Error while building for mobile platforms: Unexpected token: name (channel) (line: 22,
col: 8, pos: 328)
Error
at new JS_Parse_Error
(/Users/Nick/.meteor/packages/meteor-tool/.1.1.3.11ihb8w++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/isopackets/minifiers/npm/minifiers/node_modules/uglify-js/lib/parse.js:196:18)
Strangely, if you use the same code in a .es6.js file (compiling with Babel), this does not break the build step.
I'm not entirely sure what part of the stack might be causing this, but https://github.com/grigio/meteor-babel doesn't seem to have this issue:
When using the
let
keyword in a.jsx
file, running ameteor build
breaks on the minification step:Strangely, if you use the same code in a
.es6.js
file (compiling with Babel), this does not break the build step.Any ideas where to look from here?