-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Remix + vite using v1 routing (@remix-run/v1-route-convention
) doesnt work?
#8744
Comments
@remix-run/v1-route-convention
) doesnt work?
I wasn't able to reproduce this issue, both manually and when running your repro. I've pushed my attempt at a manual reproduction here. Can you check whether this works for you? https://github.com/markdalgleish/remix-vite-express-with-v1-routes By the way, I noticed that a sync |
@markdalgleish - thanks for the quick response Turns out this error from using I deleted the
|
@cliffordfajardo Do you set the /** @type {import(https://github.com/remix-run/remix/tree/master/packages/remix-dev).AppConfig} */
module.exports = {
// Tell Remix to ignore everything in the routes directory.
// We'll let `createRoutesFromFolders` take care of that.
ignoredRouteFiles: ["**/*"],
routes: (defineRoutes) => {
// `createRoutesFromFolders` will create routes for all files in the
// routes directory using the same default conventions as Remix v1.
return createRoutesFromFolders(defineRoutes, {
// If you're already using `ignoredRouteFiles` in your Remix config,
// you can move them to `ignoredFilePatterns` in the plugin's options.
// ignore dotfiles
ignoredFilePatterns: ["**/.*", "**/*.css"],
});
},
}; |
For the # ran from root of my remix project - then restarted dev server
find . -name ".DS_Store" -type f -delete I was curious about the When you're using Created a bug reproduction repo |
@cliffordfajardo Looks like you also need to exclude dotfiles in remix({
ignoredRouteFiles: ["**/*", "**/.*"],
routes: (defineRoutes) => {
return createRoutesFromFolders(defineRoutes, {
ignoredFilePatterns: ["**/.*", "**/*.css"],
});
},
}) |
I've fixed this in the v1-route-convention readme: https://github.com/remix-run/v1-compat-utils/tree/main/packages/v1-route-convention |
I've also opened a PR updating all the Vite templates to set |
Reproduction
I created a repo containing
Github Repo: https://github.com/cliffordfajardo/bug-remix-vite-using-v1-routing/tree/main
Reproduction Steps
1.Create a new remix app using vite express
[@remix-run/v1-route-convention](https://github.com/remix-run/v1-compat-utils)
routes/_index.ts
toroutes/index.ts
System Info
Used Package Manager
npm
Expected Behavior
After creating a fresh remix app, I should be able to use
[@remix-run/v1-route-convention](https://github.com/remix-run/v1-compat-utils)
packageActual Behavior
Remix + Vite doesnt seem to work with @remix-run/v1-route-convention
The text was updated successfully, but these errors were encountered: