From 9c4b476679b16489e1983ee0ac5efbc95d5c820a Mon Sep 17 00:00:00 2001 From: Kyle Corbitt Date: Thu, 1 Oct 2015 10:54:40 -0700 Subject: [PATCH] enable es6 module syntax MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: This is an updated copy of #1993, which was approved by @vjeux but hasn't been rebased. It whitelists the es6 module syntax and updates the JS Environment docs to match. cc @ide @​hkjorgensenCloses https://github.com/facebook/react-native/pull/3175 Reviewed By: @​svcscm Differential Revision: D2498360 Pulled By: @vjeux --- packager/react-packager/.babelrc | 1 + packager/transformer.js | 1 + 2 files changed, 2 insertions(+) diff --git a/packager/react-packager/.babelrc b/packager/react-packager/.babelrc index 45e1d6e9f..602c9fe61 100644 --- a/packager/react-packager/.babelrc +++ b/packager/react-packager/.babelrc @@ -9,6 +9,7 @@ "es6.classes", "es6.constants", "es6.destructuring", + "es6.modules", "es6.parameters", "es6.properties.computed", "es6.properties.shorthand", diff --git a/packager/transformer.js b/packager/transformer.js index 59a1ea44f..dc137c620 100644 --- a/packager/transformer.js +++ b/packager/transformer.js @@ -37,6 +37,7 @@ function transform(src, filename, options) { 'es6.classes', 'es6.constants', 'es6.destructuring', + 'es6.modules', 'es6.parameters', 'es6.properties.computed', 'es6.properties.shorthand',