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

Single page rewrite (for SPA) #1230

Closed
JustPilz opened this issue Mar 30, 2024 · 1 comment
Closed

Single page rewrite (for SPA) #1230

JustPilz opened this issue Mar 30, 2024 · 1 comment

Comments

@JustPilz
Copy link

JustPilz commented Mar 30, 2024

How to enable single page rewrite (for SPA) for the local server when the app is running?

I am using React with React-Router (BrowserRouter).
If the app is launched from the base path ('/') it's fine, but if redirected to sub-route, for example from oauth callback_url to '/any-subroute' - 404 Not found.

One solution I have found is to switch from BrowserRouter to HashRouter but I don't want to use HashRouter cause there are other problems.

Simple Web Server has special option like Single page rewrite (for SPAs): Automatically rewrite all paths that don't exist to a single page. Is there something similar in Neutralino?

@shalithasuranga
Copy link
Member

Hello @JustPilz, thanks for posting this feature request. Now, we can use the following configuration to activate SPA serving:

"singlePageServe": true,

This feature will be released with the next version soon! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants