-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Vite for windows - local dev bundling broken #8585
Comments
What looks odd is that https://github.com/remix-run/remix/blob/main/packages/remix-dev/vite/plugin.ts#L1060-L1061 which expect |
I checked this in the plugin while debugging, the extension is optional in that regex. Specifically, I am ending up with .server files being treated as routes, so the My tsconfig.json has
Which allows modules to be imported without extensions in the codebase. This is all working fine on mac, it's just windows, and while the The problem is outside of that hook pretty sure, the plugin just breaks because of something earlier in the build process and is a red herring. |
Ok, figured it out. It is the v1 route convention package (@remix-run/v1-route-convention). Once I migrated my routes to the v2 method the issue went away. Still not sure why it was causing an issue, but at least it gives me a path forward. |
Reproduction
I've been unable to reproduce it outside of my project, I'm not sure what is different but I've spent about a day trying to debug and reproduce the issue. At this point I am just opening a bug report to try get some advice on how I can debug the issue, ideas or even can jump on a call to debug it.
The problem is on Windows (the project works fine on MacOS) that Vite is fetching server modules from the browser.
Here is my Vite plugin configuration.
System Info
Used Package Manager
pnpm
Expected Behavior
Local development and HMR working on Windows for our project.
Actual Behavior
Which then causes chaos on the server
The text was updated successfully, but these errors were encountered: