This PR implements support for the env key in
It looks first for
Rationale: be able to add additional babel plugins/presets for testing environment for example (eg.
I wasn't sure where to add tests as I did not see any existing tests for the functionality. Please let me know your feedback.
I would recommend adding
The modules test app appears to be running with process.env.NODE_ENV equal to "production" on Circle CI: https://circleci.com/gh/meteor/meteor/5030. Enabling this transform in production as well as development is fine because we primarily want to test that plugins from the "env" section of .babelrc are respected, regardless of the value of process.env.NODE_ENV. Using different plugins in production might be worth testing, too, but that's less critical. Follow-up to #8963.
When the ecmascript package version was last bumped in 18e4c17, it appears that firstname.lastname@example.org had not yet been published, so ecmascript was published with a copy of that compiler plugin that did not support the "env" property of .babelrc files (#8963). Bumping again and republishing in hopes of fixing that problem.