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

use originalUrl to detect request for a wasm file #36

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Mati20041
Copy link

In the newest vite (tested on 5.3.4) the req.url is changed by htmlFallbackMiddleware to /index.html if there is no available resource (ie. in /public directory) under the requested url. It stores the original browser's path in req.originalUrl.

I fixed it because I'm starting to learn about using Rust in the webassembly and I like this plugin :)

@nshen
Copy link
Owner

nshen commented Jul 26, 2024

hi @Mati20041 thanks for you PR, please check
#34

@Mati20041
Copy link
Author

@nshen Hi! thanks for the proposition, but I'm not quite sure if I'll stick to the rust ecosystem for a longer time. I'm still exploring it :)

@haywirez
Copy link

haywirez commented Oct 6, 2024

Looks good to me, fixed my issue 👍

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.

3 participants