diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2016-08-22 15:29:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-22 15:29:35 +0200 |
commit | 2d5742c8521dbc935bb77d9ecbc86f193556aff0 (patch) | |
tree | 507517b139bfa73fe4a00ec571adc919647ea8f2 /server/sonar-web/.babelrc | |
parent | 6cee9fdcad049ca21606983b05a0a4cfc13ffd53 (diff) | |
download | sonarqube-2d5742c8521dbc935bb77d9ecbc86f193556aff0.tar.gz sonarqube-2d5742c8521dbc935bb77d9ecbc86f193556aff0.zip |
optimize js build (#1145)
Diffstat (limited to 'server/sonar-web/.babelrc')
-rw-r--r-- | server/sonar-web/.babelrc | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/server/sonar-web/.babelrc b/server/sonar-web/.babelrc index 0ecf1664f9c..fb5f2613035 100644 --- a/server/sonar-web/.babelrc +++ b/server/sonar-web/.babelrc @@ -1,17 +1,28 @@ { - "presets": ["es2015", "stage-0", "react"], + "presets": ["es2015", "es2016", "react"], "ignore": [ "**/libs/**" ], + "plugins": [ + "transform-class-properties", + "transform-object-rest-spread" + ], "env": { - "hot": { - "plugins": [["react-transform", { - "transforms": [{ - "transform": "react-transform-hmr", - "imports": ["react"], - "locals": ["module"] + "production": { + "plugins": [ + "transform-react-constant-elements" + ] + }, + "development": { + "plugins": [ + ["react-transform", { + "transforms": [{ + "transform": "react-transform-hmr", + "imports": ["react"], + "locals": ["module"] + }] }] - }]] + ] } } } |