Closed akomm closed 1 month ago
I take it back, it seems like neither ignoring it via remix's nor flatRoute's or both ignoredRouteFiles
avoid the error. Tried both **/*.svg
and even explicitly: ./app/routes/some-route/some-asset.svg
. The issue persists.
~Seem like the issue comes from the v1-route-convention
's createRoutesFromFolders
.~
NVM its mapped correctly
Is it possible, that the script does not take remix.config.cjs (commonjs)?
Sorry. It looks like my script expects it to be remix.config.js
If you don't mind I close it. I've done some quick auto refactor myself of around 300 files/folders but wasn't that hard actually because there was a pattern.
Made a test run:
npx migrate-flat-routes ./app/routes ./app/routes-hybrid --convention=hybrid
Apparently when route folders have co-located assets like for example an svg file, it throws:
Invalid route module file: app/routes/some-route/some-asset.svg
remix: 2.9.1 remix-flat-routes: 0.6.5 node: v18.18.2
I might need add some note: I know I could add the file to ignore, but its not some ad-hoc ignored file and can't possibly be confused as a route by remix.
It would also be better if the migration would move files that are not ts/tsx, that are part of the app, not just some generated ad-hoc file, instead of ignoring them.