Fixing mocha tests

This commit is contained in:
Nicolas Gotchac 2016-11-26 17:27:44 +01:00
parent 44e099000d
commit f9b3a98ff7
3 changed files with 10 additions and 3 deletions

View File

@ -1,7 +1,6 @@
{
"presets": [
"es2017", "es2016",
[ "es2015", { "modules": false } ],
"es2017", "es2016", "es2015",
"stage-0", "react"
],
"plugins": [

View File

@ -104,7 +104,7 @@
"postcss-loader": "~1.1.1",
"postcss-nested": "~1.0.0",
"postcss-simple-vars": "~3.0.0",
"progress": "^1.1.8",
"progress": "~1.1.8",
"raw-loader": "~0.5.1",
"react-addons-perf": "~15.3.2",
"react-addons-test-utils": "~15.3.2",

View File

@ -26,6 +26,13 @@ const rucksack = require('rucksack-css');
const ENV = process.env.NODE_ENV || 'development';
const isProd = ENV === 'production';
function getBabelrc () {
const babelrc = require('../.babelrc');
const es2015Index = babelrc.presets.findIndex((p) => p === 'es2015');
babelrc.preset[es2015Index] = [ 'es2015', { modules: false } ];
return babelrc;
}
function getPlugins (_isProd = isProd) {
const postcss = [
postcssImport({
@ -154,6 +161,7 @@ function addProxies (app) {
}
module.exports = {
getBabelrc: getBabelrc,
getPlugins: getPlugins,
dappsEntry: getDappsEntry(),
addProxies: addProxies