Files
meteor/tools/tool-env
Ben Newman 4fe8af4193 Use require("meteor-babel/register").excludeFile.
The excludeFile API was introduced in meteor-babel@7.8.1:
bfded57377

Modules that are evaluated before meteor-babel/register is configured
should not be transformed by meteor-babel, even if they are imported again
later, after meteor-babel/register has been configured.

If my analysis is correct, this change should prevent the dreaded

  Must export a default export when using ES6 modules.

error, as seen most recently in
https://travis-ci.org/meteor/meteor/builds/638030190
and https://circleci.com/gh/meteor/meteor/40863.
2020-01-16 12:33:54 -05:00
..

Uninteresting files that run on tool's startup (set up profilers, transpilers, etc) and exit (clean up code, flush the output).

ES2015 compilation for tool

There are two different configurations of Babel for the tools code:

  • local development from git checkout
  • running in production from a release

In the first case, it is enough to register Babel's hook for require. For the latter, this hook should be removed (#RemoveInProd) and the files should be explicitly compiled.

The listing of Babel-compiled files can be found in isopack.js, the Isopack#_writeTool method runs all the preprocessing when tools files are copied for a release package.