Closed AnthoniG closed 1 month ago
You need to import the function in your vite.config.ts
import { flatRoutes } from "remix-flat-routes";
I've tried that and it still won't work for me. I obviously missed it out of my posting above but I assure you it is there in my vite config
Anything else you can think of please?
Do you have a repo I can look at?
You can also try deleting node_modules
and run npm install
again.
I will upload the repo and post a link here. Will try the node_modules trick first
The node_modules trick worked........ Wonder what was causing it to do that. It's not like there's anything else installed.
Anyway, thanks for your help, much appreciated :smile:
I am getting an error trying to run a brand new Remix installation with the flat-routes Remix Version 2.12.0
Here is my vite.config.ts Copied the routes part from Kent's epicweb starter
Then run
npm run dev
and you will get the error as well. Not sure what I am doing wrong?Clearly something because it works when use epicweb starter (but it's too bloated for my needs), and clearly other people are using it.
So what is the secret ?
EDIT: Can not get the vite.config.ts text inside the code blocks, even though wrapped it inside back-ticks