Update my project from react 13 to react 15.3 and got some errors
<p>I'm using webpack, redux and react together, i was on a react 13 but some module i have to use depend on react 15.3, so i update my react with npm-check, but now i have some trouble.</p>

<p>I have a syntax error , unexpected token on this code since react 15.3 and i dont see why.
This is a screenshot of the error in my console :
<a href="http://i.stack.imgur.com/t5ZNg.png" rel="nofollow">error_message</a></p>

<p>This is the portion of code who doesn't work in react 15.3</p>

<pre class="lang-js prettyprint-override"><code> import express from 'express';

import webpack from 'webpack';
import webpackConfig from '../../webpack.config';
import webpackDevMiddleware from 'webpack-dev-middleware';
import webpackHotMiddleware from 'webpack-hot-middleware';

import React from 'react';
import renderToString from 'react-dom/server'
import { RoutingContext, match } from 'react-router';
import { Provider } from 'react-redux';
import history from 'history';
import { fetchComponentDataBeforeRender } from '../common/api/fetchComponentDataBeforeRender';

import configureStore from '../common/store/configureStore';
import routes from '../common/routes';
import packagejson from '../../package.json';

const app = express();
const renderFullPage = (html, initialState) =&gt; {
  return `
    &lt;!doctype html&gt;
    &lt;html&gt;
      &lt;head&gt;
        &lt;meta charset="utf-8"&gt;
        &lt;title&gt;4AilesTrophy&lt;/title&gt;
        &lt;link rel="stylesheet" type="text/css" href="/static/app.css"&gt;
        &lt;script src="https://use.fontawesome.com/b8520993ca.js"&gt;&lt;/script&gt;
        &lt;link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/balloon-css/0.3.0/balloon.min.css"&gt;

        &lt;!-- Latest compiled and minified CSS --&gt;
        &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"&gt;

        &lt;!-- Optional theme --&gt;
        &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous"&gt;
        &lt;!-- JQUERY (bootstrap need it) --&gt;
        &lt;script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"&gt;&lt;/script&gt;
        &lt;!-- Latest compiled and minified JavaScript --&gt;
        &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"&gt;&lt;/script&gt;
        &lt;script type="text/javascript" src="https://cdn.emailjs.com/dist/email.min.js"&gt;&lt;/script&gt;
        &lt;!-- API GoogleMaps --&gt;
        &lt;script async defer
          src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBNTUcCcssN7akhQRr4EG1Yfkhh6REnszE&amp;callback=initMap"&gt;
        &lt;/script&gt;
        &lt;script type="text/javascript"&gt;
           (function(){
              emailjs.init("user_BVUmJcKBthIuCTTxsaxC9");
           })();
        &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
        &lt;div id="root"&gt;${html}&lt;/div&gt;
        &lt;script&gt;
          window.__INITIAL_STATE__ = ${JSON.stringify(initialState)};
        &lt;/script&gt;
        &lt;script src="/static/bundle.js"&gt;&lt;/script&gt;
      &lt;/body&gt;
    &lt;/html&gt;
  `;
}

if(process.env.NODE_ENV !== 'production'){
  const compiler = webpack(webpackConfig);
  app.use(webpackDevMiddleware(compiler, { noInfo: true, publicPath: webpackConfig.output.publicPath }));
  app.use(webpackHotMiddleware(compiler));
}else{
  app.use('/static', express.static(__dirname + '/../../dist'));
}

app.get('/*', function (req, res) {

  const location = history.createLocation(req.url);

  match({ routes, location }, (err, redirectLocation, renderProps) =&gt; {

    if(err) {
      console.error(err);
      return res.status(500).end('Internal server error');
    }

    if(!renderProps)
      return res.status(404).end('Not found');

    const store = configureStore();

    const InitialView = (
      &lt;Provider store={store}&gt;

          &lt;RoutingContext {...renderProps} /&gt;

      &lt;/Provider&gt;
    );

    //This method waits for all render component promises to resolve before returning to browser
    fetchComponentDataBeforeRender(store.dispatch, renderProps.components, renderProps.params)
      .then(html =&gt; {
        const componentHTML = ReactDOMServer.renderToString(InitialView);
        const initialState = store.getState();
        res.status(200).end(renderFullPage(componentHTML,initialState))
      })
      .catch(err =&gt; {
        console.log(err)
        res.end(renderFullPage("",{}))
      });

  });

});



const server = app.listen(80, function () {
  const host = server.address().address;
  const port = server.address().port;
  console.log('Example app listening at http://%s:%s', host, port);
});
</code></pre>

<p>Before, in react 13 , i wrote it and it worked</p>

<pre class="lang-js prettyprint-override"><code>const InitialView = (
  &lt;Provider store={store}&gt;
    {() =&gt; &lt;RoutingContext {...renderProps} /&gt;}
  &lt;/Provider&gt;
);
</code></pre>

<p>instead of this : </p>

<pre><code>const InitialView = (
  &lt;Provider store={store}&gt;
      &lt;RoutingContext {...renderProps} /&gt;
  &lt;/Provider&gt;
);
</code></pre>

<p>If anyone can help me, it would be very helpful :)
Have a good day everyone</p>

<p>EDIT : </p>

<p>There is my .babelrc file </p>

<pre><code>    {

 "plugins": ["transform-object-rest-spread"],
  "presets": [
    "react",
    "es2015",
    "stage-2"
  ]
}
</code></pre>

<p>And there is my webpack configuartion :</p>

<pre><code>webpackConfig = merge(webpackConfig,{


  devtool: 'inline-source-map',
    module: {
      loaders: [{
        test: /\.js$/,
        loader: 'babel',
        exclude: /node_modules/,
        include: __dirname,
        query: {
          optional: ['runtime'],
          stage: 2,
          env: {
            development: {
              plugins: [
                'react-transform'
              ],
              extra: {
                'react-transform': {
                  transforms: [{
                    transform:  'react-transform-hmr',
                    imports: ['react'],
                    locals:  ['module']
                  }]
                }
              }
            }
          }
        }
      },
      { test: /\.(png|jpg|gif|jpeg)$/, loader: 'url-loader?limit=8192'},
      { test: /\.css$/, loader: 'style-loader!css-loader' }
    ]},
    entry : [
      'webpack-hot-middleware/client',
      './src/client/index.js'
    ],
    plugins : [
      new webpack.HotModuleReplacementPlugin()
    ]  
  });
</code></pre>

<p>And i tried to fit the content of the .babelrc file in my webpack config, but i didn't change nothing :(</p>