-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parser Error while generating sitemap using react router site map #110
Comments
Facing same issue, i guess it doesn't support lazy loaded components |
same issue for me too |
same issue, this plugin seems really outdated I can't believe there isn't a better solution. |
i'm not sure lazy loading is the problem, as I use it with React's lazy loading without a problem. what I suspect is going on is babel throwing an error when it encounters this:
in my code I have the following and it works:
this is my config in the
|
Any updates on this issue? |
@JeremyBrent fairly sure at this point that this issue has to do with configuring babel inside node, nothing to do with the plugin. |
@kmlx I see. Do you have any resources at hand, besides the config you defined above, that could point me in the right direction? |
any update on this error or which babel version to use to fix the issue? @kuflash |
@krishnarastogi i use this one in package.json
and my config hasn't changed since my last comment. and it still works. i assume people should try different babel configs until it works for their use case, since you'll be running react inside node. |
Here is my routes.js
import React from 'react';
import { Route } from 'react-router';
//Lazy
const Homepage = lazy(() => import('@views/homepage'));
export default (
<Route exact path="/" component={() => } />
);
Error:
/Users/gurrkr/sitemapgenerator/node_modules/babel-core/lib/transformation/file/index.js:558
throw err;
^
SyntaxError: /Users/gurrkr/sitemapgenerator/src/sitemap/sitemap-routes.js: Unexpected token (5:28)
3 |
4 | //Lazy
Can you please provide a suggestion ?
The text was updated successfully, but these errors were encountered: