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

Several regressions have been observed following the upgrade to version 2.6.2. #54

Open
HatemJerbi opened this issue Jan 5, 2025 · 2 comments · Fixed by #55
Open

Several regressions have been observed following the upgrade to version 2.6.2. #54

HatemJerbi opened this issue Jan 5, 2025 · 2 comments · Fixed by #55
Assignees
Labels
bug Something isn't working

Comments

@HatemJerbi
Copy link

  1. Static files (such as images and JSON files) located in the public directory are consistently identified as text/html, preventing them from being cached even when the cache header is set.

  2. Additionally, static files imported from the assets folder within the application directory fail to render during development due to an incorrect Content-Type of text/html. However, they function properly in production with hashed filenames.

@rphlmr
Copy link
Owner

rphlmr commented Jan 5, 2025

Can you tell me what extensions these files have?

https://github.com/rphlmr/react-router-hono-server/blob/f9b1f72aa96ecf84362deb41564fb500c398ef19/src/dev.ts#L166C10-L166C49

This is the exclusion list that makes these files (in dev) to be served as Vite resources.

It has been reworked like this to make .data queries work in development.

If you can share what you import / how you use these files it can help me to make a better filter.

You can already add these files in your vite.confg:

reactRouterHonoServer({
      dev: {exclude: [ /*regex or minimatch string*/ ]}
    })

@rphlmr rphlmr self-assigned this Jan 5, 2025
@rphlmr rphlmr added the bug Something isn't working label Jan 5, 2025
@rphlmr rphlmr closed this as completed in #55 Jan 5, 2025
@rphlmr
Copy link
Owner

rphlmr commented Jan 5, 2025

Oups auto close. Let me know if 2.6.3 fixes the issue.

@rphlmr rphlmr reopened this Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants