Alex Kotliarskyi 858643dbdf Add transform-react-jsx-source to react-native preset
Summary:
Putting this up as request for comments.

The PR adds [transform-react-jsx-source](https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-react-jsx-source) to the list of plugins that come by default with the `react-native` preset. It will enable the use of a bunch of really cool tooling around JSX, however those are generally useful only in development mode. Is changing `react-native` preset the right thing to do in this case? Is there a way to enable this transform only in DEV? Should I add this somewhere else?
Closes https://github.com/facebook/react-native/pull/6351

Differential Revision: D3302906

Pulled By: frantic

fbshipit-source-id: 012d3a4142168f9f90d30d1686115d4dc3996eb9
2016-05-18 12:43:24 -07:00

38 lines
2.7 KiB
JavaScript

/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
'use strict';
module.exports = {
'babel-plugin-react-transform': require('babel-plugin-react-transform'),
'babel-plugin-syntax-async-functions': require('babel-plugin-syntax-async-functions'),
'babel-plugin-syntax-class-properties': require('babel-plugin-syntax-class-properties'),
'babel-plugin-syntax-trailing-function-commas': require('babel-plugin-syntax-trailing-function-commas'),
'babel-plugin-transform-class-properties': require('babel-plugin-transform-class-properties'),
'babel-plugin-transform-es2015-function-name': require('babel-plugin-transform-es2015-function-name'),
'babel-plugin-transform-es2015-arrow-functions': require('babel-plugin-transform-es2015-arrow-functions'),
'babel-plugin-transform-es2015-block-scoping': require('babel-plugin-transform-es2015-block-scoping'),
'babel-plugin-transform-es2015-classes': require('babel-plugin-transform-es2015-classes'),
'babel-plugin-transform-es2015-computed-properties': require('babel-plugin-transform-es2015-computed-properties'),
'babel-plugin-check-es2015-constants': require('babel-plugin-check-es2015-constants'),
'babel-plugin-transform-es2015-destructuring': require('babel-plugin-transform-es2015-destructuring'),
'babel-plugin-transform-es2015-modules-commonjs': require('babel-plugin-transform-es2015-modules-commonjs'),
'babel-plugin-transform-es2015-parameters': require('babel-plugin-transform-es2015-parameters'),
'babel-plugin-transform-es2015-shorthand-properties': require('babel-plugin-transform-es2015-shorthand-properties'),
'babel-plugin-transform-es2015-spread': require('babel-plugin-transform-es2015-spread'),
'babel-plugin-transform-es2015-template-literals': require('babel-plugin-transform-es2015-template-literals'),
'babel-plugin-transform-flow-strip-types': require('babel-plugin-transform-flow-strip-types'),
'babel-plugin-transform-object-assign': require('babel-plugin-transform-object-assign'),
'babel-plugin-transform-object-rest-spread': require('babel-plugin-transform-object-rest-spread'),
'babel-plugin-transform-react-display-name': require('babel-plugin-transform-react-display-name'),
'babel-plugin-transform-react-jsx-source': require('babel-plugin-transform-react-jsx-source'),
'babel-plugin-transform-react-jsx': require('babel-plugin-transform-react-jsx'),
'babel-plugin-transform-regenerator': require('babel-plugin-transform-regenerator'),
'babel-plugin-transform-es2015-for-of': require('babel-plugin-transform-es2015-for-of'),
};