Skip to content
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

Negative look behind in react-router causing app not to load on mobile #50

Closed
anth0ni3 opened this issue Feb 17, 2023 · 3 comments
Closed

Comments

@anth0ni3
Copy link

const index = /(?<!pages\/)index\.(jsx|tsx)$/.test(key) ? { index: true } : {}

in "packages > generouted > src > react-router.tsx > generateRegularRoutes(). Line 22", the index variable contains regex that cause app to fail in mobile browsers.

@anth0ni3
Copy link
Author

I'm guessing this is because negative look behind in regex is not supported in most browsers.

@oedotme
Copy link
Owner

oedotme commented Feb 17, 2023

Hey @anth0ni3, thanks for reporting this!

Yes, it should be updated. Also there's no specific need to use negative look behinds here.

I'll close this issue once updated.

@oedotme
Copy link
Owner

oedotme commented Feb 19, 2023

@oedotme oedotme closed this as completed Feb 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants