-
Notifications
You must be signed in to change notification settings - Fork 29
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
New routes not detected on Windows #59
Comments
Ok, there are a couple of things.
In the meantime, here's a workaround to fix the issue. It simply replaces the path separator before returning to Remix. // route.config.js
routes: async (defineRoutes) => {
const routes = flatRoutes("routes", defineRoutes, {ignoredRouteFiles: ["**/.*"],});
Object.keys(routes).forEach(key => routes[key].file = routes[key].file?.replace(/\\/g, '/'))
return routes
}, |
Ops, fixed #2. Any idea why this only occurs during dev and not if we manually restart? |
I just updated my comment with a workaround fix. I have a feeling the new dev server expects |
Let me know if that fixes the issue, and I'll be sure to include that in the next update. |
Can confirm the workaround, worked! Nice! I assume this will get pushed on the next package update? |
Before I forgot, Happy Independence Day! |
Thanks. Yeah, I've got a couple of other changes then I'll push out the fix. |
Will the next package be released pretty quickly, or we should go ahead and implement the workaround for now for the Epic Stack? |
Ok, I pushed out v0.5.9 which includes the fix. |
Can confirm v0.5.9 fixed the bug. Thanks again, @kiliman! |
* Fix windows new route bug kiliman/remix-flat-routes#59 * bump headlessui * Update yarn.lock Becoming quite garbled, so deleted and recreated yarn.lock
Noticed this with Epic Stack and was able to nail down the issue as remix-flat-routes. Weird that no one caught this before:
What version of Remix are you using?
v1.18.1
Are all your remix dependencies & dev-dependencies using the same version?
Steps to Reproduce
(As a sanity check, I was able to confirm that this is unrelated to v2_dev server.)
npm install; npm run dev
app/routes/test.tsx
and a basic export default component.localhost:3000/test
Expected Behavior
See the test route.
Actual Behavior
404 Not Found thrown.
localhost:3000/test
renders correctly.localhost:3000/test
renders correctly without error.Possible related issue from remix core: https://github.com/remix-run/remix/pull/6293/files
The text was updated successfully, but these errors were encountered: