title: using react-router-sitemap to generate sitemap.xml for an es2016 app
body: <p>I'm trying to use <a href="https://github.com/kuflash/react-router-sitemap" rel="nofollow noreferrer">react-router-sitemap</a> to generate a sitemap.xml for my app. The app uses es2016 and as a reason , i'm getting a lot of <code>unexpected token</code> errors</p>
  
  <p>my <code>sitemap</code> file</p>
  
  <pre><code>require('babel-register');
  
  require.extensions[('.css', '.png', '.jpeg', '.jpg')] = function() {
    return null;
  };
  
  const router = require('./app/containers/App').RouteGenerator;
  const Sitemap = require('react-router-sitemap').default;
  
  new Sitemap(router).build('http://trade.sensibull.test').save('./sitemap.xml');
  </code></pre>
  
  <p>my <code>.babelrc</code> file</p>
  
  <pre><code>{
    "ignore": ["node_modules/**/*"],
    "presets": ["es2016", "es2015", "react"],
    "plugins": [
      [
        "module-resolver",
        {
          "root": ["./app"]
        }
      ]
    ]
  }
  </code></pre>
  
  <p>this is the error i'm getting</p>
  
  <pre><code>SyntaxError: /home/kj/Desktop/platform/frontend/app/utils/injectSaga.js: Unexpected token (20:28)
    18 | export default ({ key, saga, mode }) =&gt; WrappedComponent =&gt; {
    19 |   class InjectSaga extends React.Component {
  &gt; 20 |     static WrappedComponent = WrappedComponent;
       |                             ^
    21 |     static contextTypes = {
    22 |       store: PropTypes.object.isRequired,
    23 |     };
  </code></pre>
  
  <p>Any ideas on how i can resolve this?</p>