diff --git a/.babelrc b/.babelrc new file mode 100644 index 00000000..0a714502 --- /dev/null +++ b/.babelrc @@ -0,0 +1,27 @@ +{ + 'presets': ['react', 'es2015-no-commonjs'], + 'plugins': [ + 'transform-object-assign', + 'transform-object-rest-spread', + 'transform-react-display-name', + [ 'transform-runtime', { + 'polyfill': false, + 'regenerator': false + } ] + ], + 'sourceMaps': true, + + 'env': { + 'demo': { + 'plugins': [ + [ 'react-transform', { + 'transforms': [{ + 'transform': 'react-transform-hmr', + 'imports': ['react'], + 'locals': ['module'] + }] + } ] + ] + } + } +} diff --git a/package.json b/package.json index 64dd17d3..2bbc071c 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,15 @@ "dependencies": { "alt": "^0.16.5", "audiojs": "vrde/audiojs", - "babel": "^5.6.14", + "babel-cli": "^6.9.0", + "babel-loader": "^6.2.4", + "babel-plugin-react-transform": "^2.0.2", + "babel-plugin-transform-object-assign": "^6.8.0", + "babel-plugin-transform-object-rest-spread": "^6.8.0", + "babel-plugin-transform-react-display-name": "^6.8.0", + "babel-plugin-transform-runtime": "^6.9.0", + "babel-preset-es2015-no-commonjs": "0.0.2", + "babel-preset-react": "^6.5.0", "bootstrap-sass": "^3.3.4", "camelcase": "^1.2.1", "classlist-polyfill": "^1.0.2", @@ -75,6 +83,7 @@ "react-router-bootstrap": "^0.19.0", "react-star-rating": "~1.3.2", "react-textarea-autosize": "^2.5.2", + "react-transform-hmr": "^1.0.4", "shallow-equals": "0.0.0", "shmui": "^0.1.0", "spark-md5": "~1.0.0"