Closed kinsomicrote closed 5 months ago
Update your remix.config.js file. You need to ignore all files in routes, since Remix will still try to process the routes using the default convention.
import { flatRoutes } from 'remix-flat-routes'
/** @type {import('@remix-run/dev').AppConfig} */
export default {
ignoredRouteFiles: ["**/*"], // ignore all files in routes (default convention)
serverModuleFormat: 'esm',
tailwind: true,
postcss: true,
routes: async defineRoutes => {
return flatRoutes('routes', defineRoutes, {
ignoredRouteFiles: [],
})
},
// appDirectory: "app",
// assetsBuildDirectory: "public/build",
// publicPath: "/build/",
// serverBuildPath: "build/index.js",
};
That worked! Thanks!
Hello, I added the remix-flat-routes and modified my routes, and then I got this error when I deployed to Vercel.
This is what my
remix.config.js
looks like;This is what my route looks like:
I have no idea what I am missing. Any hints? Thanks.