diff --git a/app/routes.ts b/app/routes.ts new file mode 100644 index 0000000..8389284 --- /dev/null +++ b/app/routes.ts @@ -0,0 +1,3 @@ +import { flatRoutes } from "@remix-run/fs-routes"; + +export default flatRoutes(); diff --git a/package-lock.json b/package-lock.json index bbb0d98..fd41ea7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,7 +35,10 @@ "devDependencies": { "@eslint/js": "^9.17.0", "@faker-js/faker": "^9.3.0", + "@react-router/remix-config-routes-adapter": "^0.0.0-nightly-bf7ecb711-20240911", "@remix-run/dev": "^2.15.2", + "@remix-run/fs-routes": "^2.15.2", + "@remix-run/route-config": "^2.15.2", "@testing-library/cypress": "^10.0.2", "@testing-library/jest-dom": "^6.6.3", "@types/bcryptjs": "^2.4.5", @@ -62,6 +65,7 @@ "postcss": "^8.4.39", "prettier": "^3.3.3", "prettier-plugin-tailwindcss": "^0.6.5", + "remix-flat-routes": "^0.6.5", "sharp": "^0.33.4", "start-server-and-test": "^2.0.9", "tailwindcss": "^3.4.17", @@ -3145,6 +3149,24 @@ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, + "node_modules/@react-router/remix-config-routes-adapter": { + "version": "0.0.0-nightly-bf7ecb711-20240911", + "resolved": "https://registry.npmjs.org/@react-router/remix-config-routes-adapter/-/remix-config-routes-adapter-0.0.0-nightly-bf7ecb711-20240911.tgz", + "integrity": "sha512-F4OG29Moiq60sFaP0WZnqhwdVHfzmk2vKb860eYedFrHPSH7LftWvaOry25XUirUUEZql5L8N3PgLboZuOTehA==", + "dev": true, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@react-router/dev": "^0.0.0-nightly-bf7ecb711-20240911", + "typescript": "^5.1.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/@react-stately/utils": { "version": "3.10.5", "resolved": "https://registry.npmjs.org/@react-stately/utils/-/utils-3.10.5.tgz", @@ -3290,6 +3312,25 @@ } } }, + "node_modules/@remix-run/fs-routes": { + "version": "2.15.2", + "resolved": "https://registry.npmjs.org/@remix-run/fs-routes/-/fs-routes-2.15.2.tgz", + "integrity": "sha512-Ozf0ab5OcyJ0OcOHtjO726VptDXMOp+xek6n/Wp3A+IcaY2tmWWChYsw8O0dKZ5Q5BCJv3hlLX99PLadX9wqeg==", + "dev": true, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@remix-run/dev": "^2.15.2", + "@remix-run/route-config": "^2.15.2", + "typescript": "^5.1.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/@remix-run/node": { "version": "2.15.2", "resolved": "https://registry.npmjs.org/@remix-run/node/-/node-2.15.2.tgz", @@ -3340,6 +3381,27 @@ } } }, + "node_modules/@remix-run/route-config": { + "version": "2.15.2", + "resolved": "https://registry.npmjs.org/@remix-run/route-config/-/route-config-2.15.2.tgz", + "integrity": "sha512-xAbH3VCgsvUK3YH2INU7yhZMjbw5bGoSaGEGS3k+QdX8a9gWeFKPex+w76ZNjVNVVOMOE+yJVpdN9RrIu0Pfeg==", + "dev": true, + "dependencies": { + "lodash": "^4.17.21" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@remix-run/dev": "^2.15.2", + "typescript": "^5.1.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/@remix-run/router": { "version": "1.21.0", "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.21.0.tgz", @@ -3403,6 +3465,33 @@ "node": ">= 0.6" } }, + "node_modules/@remix-run/v1-route-convention": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@remix-run/v1-route-convention/-/v1-route-convention-0.1.4.tgz", + "integrity": "sha512-fVTr9YlNLWfaiM/6Y56sOtcY8x1bBJQHY0sDWO5+Z/vjJ2Ni7fe2fwrzs1jUFciMPXqBQdFGePnkuiYLz3cuUA==", + "dev": true, + "dependencies": { + "minimatch": "^7.4.3" + }, + "peerDependencies": { + "@remix-run/dev": "^1.15.0 || ^2.0.0" + } + }, + "node_modules/@remix-run/v1-route-convention/node_modules/minimatch": { + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz", + "integrity": "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@remix-run/web-blob": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@remix-run/web-blob/-/web-blob-3.1.0.tgz", @@ -13843,6 +13932,49 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/remix-flat-routes": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/remix-flat-routes/-/remix-flat-routes-0.6.5.tgz", + "integrity": "sha512-VvPak+LCxL4Fm6Kb/nqPLipB71k9p+GXpzRNPVxs9FmCeJ7hxVmQ3HQMpStzuRQyAh0PMkaX6mBiRlCRHTCYHw==", + "dev": true, + "dependencies": { + "@remix-run/v1-route-convention": "^0.1.3", + "fs-extra": "^11.1.1", + "minimatch": "^5.1.0" + }, + "bin": { + "migrate-flat-routes": "dist/cli.js" + }, + "peerDependencies": { + "@remix-run/dev": "^1.15.0 || ^2" + } + }, + "node_modules/remix-flat-routes/node_modules/fs-extra": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/remix-flat-routes/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/request-progress": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz", diff --git a/package.json b/package.json index 1caff8d..c2ac4d1 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,10 @@ "devDependencies": { "@eslint/js": "^9.17.0", "@faker-js/faker": "^9.3.0", + "@react-router/remix-config-routes-adapter": "^0.0.0-nightly-bf7ecb711-20240911", "@remix-run/dev": "^2.15.2", + "@remix-run/fs-routes": "^2.15.2", + "@remix-run/route-config": "^2.15.2", "@testing-library/cypress": "^10.0.2", "@testing-library/jest-dom": "^6.6.3", "@types/bcryptjs": "^2.4.5", @@ -87,6 +90,7 @@ "postcss": "^8.4.39", "prettier": "^3.3.3", "prettier-plugin-tailwindcss": "^0.6.5", + "remix-flat-routes": "^0.6.5", "sharp": "^0.33.4", "start-server-and-test": "^2.0.9", "tailwindcss": "^3.4.17", diff --git a/vite.config.ts b/vite.config.ts index 3d88c35..9be8e34 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -19,6 +19,7 @@ export default defineConfig({ v3_throwAbortReason: true, v3_singleFetch: true, v3_lazyRouteDiscovery: true, + v3_routeConfig: true, }, }), tsconfigPaths(),