From d024d3ad7082c1049f92657127e93edd41ab933d Mon Sep 17 00:00:00 2001 From: Andrew Fuller Date: Fri, 16 Jun 2017 00:09:16 -0500 Subject: [PATCH] Transform based on env Couldn't get this to merge properly so leaving it in both places --- .babelrc | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.babelrc b/.babelrc index e68d2fea..d2579367 100644 --- a/.babelrc +++ b/.babelrc @@ -1,3 +1,21 @@ { - "presets": ["es2015", "stage-2", "react"] + "presets": ["react"], + "env": { + "commonjs": { + "plugins": [ + "transform-class-properties", + "transform-object-rest-spread" + ], + "presets": ["env"] + }, + "es": { + "plugins": [ + "transform-class-properties", + "transform-object-rest-spread" + ], + "presets": [ + ["env", { "modules": false }] + ] + } + }, }