UNPKG

739 BJavaScriptView Raw
1/**
2 * Copyright (c) 2015-present, Facebook, Inc.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7'use strict';
8
9const create = require('./create');
10
11module.exports = function(api, opts) {
12 // This is similar to how `env` works in Babel:
13 // https://babeljs.io/docs/usage/babelrc/#env-option
14 // We are not using `env` because it’s ignored in versions > babel-core@6.10.4:
15 // https://github.com/babel/babel/issues/4539
16 // https://github.com/facebook/create-react-app/issues/720
17 // It’s also nice that we can enforce `NODE_ENV` being specified.
18 const env = process.env.BABEL_ENV || process.env.NODE_ENV;
19 return create(api, opts, env);
20};