Я пытаюсь использовать response-router-sitemap для создания файла sitemap.xml для моего приложения.Приложение использует es2016 и, как причина, я получаю много unexpected token
ошибок
мой sitemap
файл
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');
мой .babelrc
файл
{
"ignore": ["node_modules/**/*"],
"presets": ["es2016", "es2015", "react"],
"plugins": [
[
"module-resolver",
{
"root": ["./app"]
}
]
]
}
это ошибка, которую я получаю
SyntaxError: /home/kj/Desktop/platform/frontend/app/utils/injectSaga.js: Unexpected token (20:28)
18 | export default ({ key, saga, mode }) => WrappedComponent => {
19 | class InjectSaga extends React.Component {
> 20 | static WrappedComponent = WrappedComponent;
| ^
21 | static contextTypes = {
22 | store: PropTypes.object.isRequired,
23 | };
Любые идеи о том, как я могу решить эту проблему?