Files
meteor/tools/tests
Ben Newman 6ae14731a2 Avoid hiding errors due to missing dependencies of custom Babel plugins.
As illustrated by #9554, if a custom .babelrc plugin such as
@babel/plugin-proposal-optional-chaining imports a missing dependency such
as @babel/core, that failure causes inputFile.require to throw an
exception that looks a lot like @babel/plugin-proposal-optional-chaining
itself is missing, which can be confusing.

This change does not fix the underlying problem (the @babel/core package
still needs to be installed), but it does expose the exception so that the
developer can do something about it, rather than merely leaving the ?.
syntax uncompiled.

Here's the offending line of code:
47ce7e71c9/packages/babel-plugin-proposal-optional-chaining/src/index.js (L2)

Unfortunately, depending directly on @babel/core seems to be the policy
for Babel plugins, per this PR: https://github.com/babel/babel/pull/6778
2018-01-19 18:19:31 -05:00
..
2016-06-06 02:17:36 +03:00
2018-01-16 18:56:04 -05:00
2015-08-06 16:39:00 -07:00
2017-09-22 08:47:37 -04:00
2017-04-07 18:50:17 +03:00
2016-05-13 15:09:03 -07:00