-
Notifications
You must be signed in to change notification settings - Fork 125
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
Use sanitizedUrl.search to format search params #338
Conversation
Replaces `matchingRewriteRouteQueryString` with `sanitizedUrl.search` to property format the search params
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great. Thanks!
@manekinekko Would be great to add a test for this. Do we have Cypress tests that test a dev server and not static? |
We don't. But we can update the static app to take into account fetching query params through JavaScript and making sure this implementation doesn't regress. cc @sgollapudi77 @Reshmi-Sriram |
I can create an open issue for testing this feature to work on and merge this PR now. |
Great idea. Let’s get this merged and released soon. Let me know if I can help. |
I was running into an issue with this while setting up a Vite frontend (React template) with the SWA cli.
The change of adding
matchingRewriteRouteQueryString
to the end results in this:Notice the missing
?
prefix.I instead replaced it with this:
The mapping is now correct.
And it correctly appends the search params and lets the Vite React starter load correctly.