Skip to content

[Bug?]: ts/js files placed inside of web/src are getting served instead of serving the proper route #9740

@suzdalnitski

Description

@suzdalnitski

What's not working?

I've added auth.tsx to web/src. I also have an /auth route. However, going to localhost:8910/auth serves the raw javascript (ie loads the page), instead of simply updating the route within the frontend app.

This seems to be related to this Vite issue: vitejs/vite#3502

I'm not sure if this can be fixed on the Redwood side, but until Vite fixes this issue, it may be worthwhile to add this to documentation (ie avoid having the same name for a file in web/src and a route).

How do we reproduce the bug?

  • Add a file web/src/auth.tsx
  • Also have a route for /auth (this probably is optional)
  • Try going to localhost:8910/auth

What's your environment? (If it applies)

No response

Are you interested in working on this?

  • I'm interested in working on this

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions