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

feat: add relative path support #1576

Closed
wants to merge 2 commits into from
Closed

feat: add relative path support #1576

wants to merge 2 commits into from

Conversation

SunnyLimc
Copy link

@SunnyLimc SunnyLimc commented May 17, 2023

#720

UPDATE: Because this implementation is not elegant and may lead to bugs, I am closing the pull request


Add support for relative paths to the application

As this project uses react-router-dom as the routing component (in which the URL uses "#" to achieve page routing functionality), changing the route does not actually change the directory of the page.

We can use some tricks to support relative paths without requiring users to modify any configuration files on the proxy server side for application deployment.

Until a better method is found, some links that can only use absolute paths need to be discarded.

WARNING: If the routing implementation needs to be changed in later development, this change needs to be reverted.

@SunnyLimc SunnyLimc changed the title feat: add relative path support for react-router-dom feat: add relative path support May 17, 2023
@SunnyLimc SunnyLimc closed this May 20, 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

Successfully merging this pull request may close these issues.

1 participant