From 32a355aef9e8757e9af1e560b59177b7c88a126c Mon Sep 17 00:00:00 2001 From: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com> Date: Thu, 12 Sep 2024 00:17:56 +1200 Subject: [PATCH] refactor: set the `index` and `route` tokens on the router (#419) * refactor: set the `index` and `route` tokens on the router * refactor: remove dashboard route * refactor: remove agreement routes * refactor: remove customer routes * refactor: remove fleet routes * refactor: remove report routes * refactor: remove reservation routes * refactor: remove settings routes * refactor: regenerate the routeTree and relink the routes * refactor: disable route manifest generation * refactor: rename the vite react plugin * chore: upgrade tanstack router packages * chore: turn off sourcemaps during build --- package.json | 6 +- pnpm-lock.yaml | 56 +-- src/route-tree.gen.ts | 378 +----------------- ...reements.$agreementId._details._index.tsx} | 0 ...ements.index.tsx => agreements._index.tsx} | 0 ...customers.$customerId._details._index.tsx} | 0 ...stomers.index.tsx => customers._index.tsx} | 0 .../(dashboard)/{index.tsx => _index.tsx} | 0 ...x => fleet.$vehicleId._details._index.tsx} | 0 .../{fleet.index.tsx => fleet._index.tsx} | 0 ...index.tsx => reports.$reportId._index.tsx} | 0 .../{reports.index.tsx => reports._index.tsx} | 0 ...ations.$reservationId._details._index.tsx} | 0 ...ions.index.tsx => reservations._index.tsx} | 0 ...settings.index.tsx => settings._index.tsx} | 0 ...ex.tsx => settings.application._index.tsx} | 0 vite.config.ts | 11 +- 17 files changed, 51 insertions(+), 400 deletions(-) rename src/routes/_auth/(agreements)/{agreements.$agreementId._details.index.tsx => agreements.$agreementId._details._index.tsx} (100%) rename src/routes/_auth/(agreements)/{agreements.index.tsx => agreements._index.tsx} (100%) rename src/routes/_auth/(customers)/{customers.$customerId._details.index.tsx => customers.$customerId._details._index.tsx} (100%) rename src/routes/_auth/(customers)/{customers.index.tsx => customers._index.tsx} (100%) rename src/routes/_auth/(dashboard)/{index.tsx => _index.tsx} (100%) rename src/routes/_auth/(fleet)/{fleet.$vehicleId._details.index.tsx => fleet.$vehicleId._details._index.tsx} (100%) rename src/routes/_auth/(fleet)/{fleet.index.tsx => fleet._index.tsx} (100%) rename src/routes/_auth/(reports)/{reports.$reportId.index.tsx => reports.$reportId._index.tsx} (100%) rename src/routes/_auth/(reports)/{reports.index.tsx => reports._index.tsx} (100%) rename src/routes/_auth/(reservations)/{reservations.$reservationId._details.index.tsx => reservations.$reservationId._details._index.tsx} (100%) rename src/routes/_auth/(reservations)/{reservations.index.tsx => reservations._index.tsx} (100%) rename src/routes/_auth/(settings)/{settings.index.tsx => settings._index.tsx} (100%) rename src/routes/_auth/(settings)/{settings.application.index.tsx => settings.application._index.tsx} (100%) diff --git a/package.json b/package.json index eff29ca5..22d5811a 100644 --- a/package.json +++ b/package.json @@ -48,10 +48,10 @@ "@tanstack/query-broadcast-client-experimental": "^5.54.1", "@tanstack/react-query": "^5.54.1", "@tanstack/react-query-devtools": "^5.54.1", - "@tanstack/react-router": "^1.56.5", + "@tanstack/react-router": "^1.57.9", "@tanstack/react-table": "^8.20.5", "@tanstack/react-virtual": "^3.10.7", - "@tanstack/router-devtools": "^1.56.5", + "@tanstack/router-devtools": "^1.57.9", "@ts-rest/core": "^3.51.0", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", @@ -85,7 +85,7 @@ "@tailwindcss/container-queries": "^0.1.1", "@tailwindcss/forms": "^0.5.9", "@tailwindcss/typography": "^0.5.15", - "@tanstack/router-plugin": "^1.56.4", + "@tanstack/router-plugin": "^1.57.9", "@types/node": "^22.5.4", "@types/react": "^18.3.5", "@types/react-dom": "^18.3.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1ff02aca..0ad61fbd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -90,8 +90,8 @@ importers: specifier: ^5.54.1 version: 5.54.1(@tanstack/react-query@5.54.1(react@18.3.1))(react@18.3.1) '@tanstack/react-router': - specifier: ^1.56.5 - version: 1.56.5(@tanstack/router-generator@1.56.4)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^1.57.9 + version: 1.57.9(@tanstack/router-generator@1.57.9)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@tanstack/react-table': specifier: ^8.20.5 version: 8.20.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -99,8 +99,8 @@ importers: specifier: ^3.10.7 version: 3.10.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@tanstack/router-devtools': - specifier: ^1.56.5 - version: 1.56.5(@tanstack/react-router@1.56.5(@tanstack/router-generator@1.56.4)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(csstype@3.1.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^1.57.9 + version: 1.57.9(@tanstack/react-router@1.57.9(@tanstack/router-generator@1.57.9)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(csstype@3.1.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@ts-rest/core': specifier: ^3.51.0 version: 3.51.0(@types/node@22.5.4)(zod@3.23.8) @@ -196,8 +196,8 @@ importers: specifier: ^0.5.15 version: 0.5.15(tailwindcss@3.4.10) '@tanstack/router-plugin': - specifier: ^1.56.4 - version: 1.56.4(vite@5.4.3(@types/node@22.5.4)) + specifier: ^1.57.9 + version: 1.57.9(vite@5.4.3(@types/node@22.5.4)) '@types/node': specifier: ^22.5.4 version: 22.5.4 @@ -1675,8 +1675,8 @@ packages: peerDependencies: tailwindcss: '>=3.0.0 || insiders || >=4.0.0-alpha.20' - '@tanstack/history@1.51.7': - resolution: {integrity: sha512-y25aH3NDbdUp5Gk6Fnb77LsHTT2JrzVgI44ZiyEOf8i2j14Ma3oJ80fCw7rT/iV4xa4IN2Yex9flAsZQdh1i4A==} + '@tanstack/history@1.57.6': + resolution: {integrity: sha512-ppAJbnUaHdHmccVmplcd1ivX4GMPHxhStSquuuz0TSAEPEpz0iOVBur4iKfvIuMKm24c40nhvaEwZbKGVfbrGg==} engines: {node: '>=12'} '@tanstack/match-sorter-utils@8.19.4': @@ -1703,12 +1703,12 @@ packages: peerDependencies: react: ^18 || ^19 - '@tanstack/react-router@1.56.5': - resolution: {integrity: sha512-qCmBgplLlqOSW1eLlKglTTFMv9zlsL8CJZWN0J0+YLkHSmbsdTKQhfA4bFveXL+EwjrJgFT+/GgIfB8fZEp8PQ==} + '@tanstack/react-router@1.57.9': + resolution: {integrity: sha512-lwPAGPlRIZI2+gUcJuXjUAk6KhcHxJed0QssBAY0m7bmZl1f24EGSPsVeDlGYC0m2rH09w3lZ03JQxgzcQ5rcA==} engines: {node: '>=12'} peerDependencies: '@tanstack/react-generator': '*' - '@tanstack/router-generator': 1.56.4 + '@tanstack/router-generator': 1.57.9 react: '>=18' react-dom: '>=18' peerDependenciesMeta: @@ -1734,23 +1734,23 @@ packages: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - '@tanstack/router-devtools@1.56.5': - resolution: {integrity: sha512-/yI0St7ldXxajH5BmKiO2FsrD1wQ1Z4ZxLLG1RKeIJsVBz5zWWvlI7tlv5EpBVdVgiGQPrd2turx4gUKFLVP+g==} + '@tanstack/router-devtools@1.57.9': + resolution: {integrity: sha512-PHj8+uADH8R6dJ9XZPWjMpXAYX7Pq0MtnRFuZ6su9DaIybnXSCNZfDhNfahNaxkxYjolMa/cxI9bwRW/qk0n+w==} engines: {node: '>=12'} peerDependencies: - '@tanstack/react-router': ^1.56.5 + '@tanstack/react-router': ^1.57.9 react: '>=18' react-dom: '>=18' - '@tanstack/router-generator@1.56.4': - resolution: {integrity: sha512-VR2/8Vl8LTyxK/CWpc0yWB8kCdAa37Q1WvpbvO6jkyph7gqmlTWPb9PB58mSsuWxO7phbTxY8mMTR/Gr+6y+0A==} + '@tanstack/router-generator@1.57.9': + resolution: {integrity: sha512-zDkyb6JLkvHc/Hhu9F+Gn4JzUR7ZgtH1rbcI2H14JG8IjW1ahtko/r0a2Ev+G4kNqhZF0a5sSgh/tMQOIPZyjg==} engines: {node: '>=12'} - '@tanstack/router-plugin@1.56.4': - resolution: {integrity: sha512-diesCHg9b8rtRyX2kRappb419kloLJ5BzsDaZoMXd1kYvaCKh9/wD9ZTyKjwoyChXWwczeXvWAALao3+WlWXOw==} + '@tanstack/router-plugin@1.57.9': + resolution: {integrity: sha512-hMQeZE9TXy10ZNbOkYJDtx07neJUaebTAU/Ep7wAV/uVvgkuGcsjHfXU1HyNfSJV/9Iivrua7ozIJzW2ep+V/A==} engines: {node: '>=12'} peerDependencies: - '@rsbuild/core': '>=1.0.0' + '@rsbuild/core': '>=1.0.1-rc.5' vite: '>=5.0.0' webpack: '>=5.92.0' peerDependenciesMeta: @@ -5038,7 +5038,7 @@ snapshots: postcss-selector-parser: 6.0.10 tailwindcss: 3.4.10 - '@tanstack/history@1.51.7': {} + '@tanstack/history@1.57.6': {} '@tanstack/match-sorter-utils@8.19.4': dependencies: @@ -5064,11 +5064,11 @@ snapshots: '@tanstack/query-core': 5.54.1 react: 18.3.1 - '@tanstack/react-router@1.56.5(@tanstack/router-generator@1.56.4)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@tanstack/react-router@1.57.9(@tanstack/router-generator@1.57.9)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@tanstack/history': 1.51.7 + '@tanstack/history': 1.57.6 '@tanstack/react-store': 0.5.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@tanstack/router-generator': 1.56.4 + '@tanstack/router-generator': 1.57.9 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) tiny-invariant: 1.3.3 @@ -5093,9 +5093,9 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - '@tanstack/router-devtools@1.56.5(@tanstack/react-router@1.56.5(@tanstack/router-generator@1.56.4)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(csstype@3.1.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@tanstack/router-devtools@1.57.9(@tanstack/react-router@1.57.9(@tanstack/router-generator@1.57.9)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(csstype@3.1.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@tanstack/react-router': 1.56.5(@tanstack/router-generator@1.56.4)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@tanstack/react-router': 1.57.9(@tanstack/router-generator@1.57.9)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) clsx: 2.1.1 goober: 2.1.14(csstype@3.1.3) react: 18.3.1 @@ -5103,14 +5103,14 @@ snapshots: transitivePeerDependencies: - csstype - '@tanstack/router-generator@1.56.4': + '@tanstack/router-generator@1.57.9': dependencies: '@tanstack/virtual-file-routes': 1.56.0 prettier: 3.3.3 tsx: 4.19.0 zod: 3.23.8 - '@tanstack/router-plugin@1.56.4(vite@5.4.3(@types/node@22.5.4))': + '@tanstack/router-plugin@1.57.9(vite@5.4.3(@types/node@22.5.4))': dependencies: '@babel/core': 7.25.2 '@babel/generator': 7.25.0 @@ -5120,7 +5120,7 @@ snapshots: '@babel/template': 7.25.0 '@babel/traverse': 7.25.3 '@babel/types': 7.25.2 - '@tanstack/router-generator': 1.56.4 + '@tanstack/router-generator': 1.57.9 '@tanstack/virtual-file-routes': 1.56.0 '@types/babel__core': 7.20.5 '@types/babel__generator': 7.6.8 diff --git a/src/route-tree.gen.ts b/src/route-tree.gen.ts index 87e86afb..8971eb32 100644 --- a/src/route-tree.gen.ts +++ b/src/route-tree.gen.ts @@ -18,18 +18,18 @@ import { Route as PublicLogoutImport } from "./routes/_public/logout" import { Route as PublicLoginImport } from "./routes/_public/login" import { Route as PublicLoggedOutImport } from "./routes/_public/logged-out" import { Route as PublicDevImport } from "./routes/_public/dev" -import { Route as AuthdashboardIndexImport } from "./routes/_auth/(dashboard)/index" +import { Route as AuthdashboardIndexImport } from "./routes/_auth/(dashboard)/_index" import { Route as AuthsettingsSettingsImport } from "./routes/_auth/(settings)/settings" import { Route as AuthreservationsReservationsImport } from "./routes/_auth/(reservations)/reservations" import { Route as AuthfleetFleetImport } from "./routes/_auth/(fleet)/fleet" import { Route as AuthcustomersCustomersImport } from "./routes/_auth/(customers)/customers" import { Route as AuthagreementsAgreementsImport } from "./routes/_auth/(agreements)/agreements" -import { Route as AuthsettingsSettingsIndexImport } from "./routes/_auth/(settings)/settings.index" -import { Route as AuthreservationsReservationsIndexImport } from "./routes/_auth/(reservations)/reservations.index" -import { Route as AuthreportsReportsIndexImport } from "./routes/_auth/(reports)/reports.index" -import { Route as AuthfleetFleetIndexImport } from "./routes/_auth/(fleet)/fleet.index" -import { Route as AuthcustomersCustomersIndexImport } from "./routes/_auth/(customers)/customers.index" -import { Route as AuthagreementsAgreementsIndexImport } from "./routes/_auth/(agreements)/agreements.index" +import { Route as AuthsettingsSettingsIndexImport } from "./routes/_auth/(settings)/settings._index" +import { Route as AuthreservationsReservationsIndexImport } from "./routes/_auth/(reservations)/reservations._index" +import { Route as AuthreportsReportsIndexImport } from "./routes/_auth/(reports)/reports._index" +import { Route as AuthfleetFleetIndexImport } from "./routes/_auth/(fleet)/fleet._index" +import { Route as AuthcustomersCustomersIndexImport } from "./routes/_auth/(customers)/customers._index" +import { Route as AuthagreementsAgreementsIndexImport } from "./routes/_auth/(agreements)/agreements._index" import { Route as AuthsettingsSettingsVehiclesAndCategoriesImport } from "./routes/_auth/(settings)/settings.vehicles-and-categories" import { Route as AuthsettingsSettingsRuntimeConfigurationImport } from "./routes/_auth/(settings)/settings.runtime-configuration" import { Route as AuthsettingsSettingsRatesAndChargesImport } from "./routes/_auth/(settings)/settings.rates-and-charges" @@ -43,8 +43,8 @@ import { Route as AuthcustomersCustomersNewImport } from "./routes/_auth/(custom import { Route as AuthcustomersCustomersCustomerIdImport } from "./routes/_auth/(customers)/customers.$customerId" import { Route as AuthagreementsAgreementsNewImport } from "./routes/_auth/(agreements)/agreements.new" import { Route as AuthagreementsAgreementsAgreementIdImport } from "./routes/_auth/(agreements)/agreements.$agreementId" -import { Route as AuthsettingsSettingsApplicationIndexImport } from "./routes/_auth/(settings)/settings.application.index" -import { Route as AuthreportsReportsReportIdIndexImport } from "./routes/_auth/(reports)/reports.$reportId.index" +import { Route as AuthsettingsSettingsApplicationIndexImport } from "./routes/_auth/(settings)/settings.application._index" +import { Route as AuthreportsReportsReportIdIndexImport } from "./routes/_auth/(reports)/reports.$reportId._index" import { Route as AuthsettingsSettingsApplicationUsersImport } from "./routes/_auth/(settings)/settings.application.users" import { Route as AuthsettingsSettingsApplicationStoreHoursAndHolidaysImport } from "./routes/_auth/(settings)/settings.application.store-hours-and-holidays" import { Route as AuthsettingsSettingsApplicationPermissionsAndRolesImport } from "./routes/_auth/(settings)/settings.application.permissions-and-roles" @@ -58,10 +58,10 @@ import { Route as AuthcustomersCustomersCustomerIdDetailsImport } from "./routes import { Route as AuthagreementsAgreementsAgreementIdEditImport } from "./routes/_auth/(agreements)/agreements.$agreementId.edit" import { Route as AuthagreementsAgreementsAgreementIdCheckInImport } from "./routes/_auth/(agreements)/agreements.$agreementId.check-in" import { Route as AuthagreementsAgreementsAgreementIdDetailsImport } from "./routes/_auth/(agreements)/agreements.$agreementId._details" -import { Route as AuthreservationsReservationsReservationIdDetailsIndexImport } from "./routes/_auth/(reservations)/reservations.$reservationId._details.index" -import { Route as AuthfleetFleetVehicleIdDetailsIndexImport } from "./routes/_auth/(fleet)/fleet.$vehicleId._details.index" -import { Route as AuthcustomersCustomersCustomerIdDetailsIndexImport } from "./routes/_auth/(customers)/customers.$customerId._details.index" -import { Route as AuthagreementsAgreementsAgreementIdDetailsIndexImport } from "./routes/_auth/(agreements)/agreements.$agreementId._details.index" +import { Route as AuthreservationsReservationsReservationIdDetailsIndexImport } from "./routes/_auth/(reservations)/reservations.$reservationId._details._index" +import { Route as AuthfleetFleetVehicleIdDetailsIndexImport } from "./routes/_auth/(fleet)/fleet.$vehicleId._details._index" +import { Route as AuthcustomersCustomersCustomerIdDetailsIndexImport } from "./routes/_auth/(customers)/customers.$customerId._details._index" +import { Route as AuthagreementsAgreementsAgreementIdDetailsIndexImport } from "./routes/_auth/(agreements)/agreements.$agreementId._details._index" import { Route as AuthreservationsReservationsReservationIdDetailsSummaryImport } from "./routes/_auth/(reservations)/reservations.$reservationId._details.summary" import { Route as AuthreservationsReservationsReservationIdDetailsNotesImport } from "./routes/_auth/(reservations)/reservations.$reservationId._details.notes" import { Route as AuthfleetFleetVehicleIdDetailsSummaryImport } from "./routes/_auth/(fleet)/fleet.$vehicleId._details.summary" @@ -1577,355 +1577,3 @@ export const routeTree = rootRoute ._addFileTypes() /* prettier-ignore-end */ - -/* ROUTE_MANIFEST_START -{ - "routes": { - "__root__": { - "filePath": "__root.tsx", - "children": [ - "/_auth", - "/_public" - ] - }, - "/_auth": { - "filePath": "_auth.tsx", - "children": [ - "/_auth/agreements", - "/_auth/customers", - "/_auth/fleet", - "/_auth/reservations", - "/_auth/settings", - "/_auth/", - "/_auth/reports/", - "/_auth/reports/$reportId/" - ] - }, - "/_public": { - "filePath": "_public.tsx", - "children": [ - "/_public/dev", - "/_public/logged-out", - "/_public/login", - "/_public/logout", - "/_public/oidc-callback" - ] - }, - "/_public/dev": { - "filePath": "_public/dev.tsx", - "parent": "/_public" - }, - "/_public/logged-out": { - "filePath": "_public/logged-out.tsx", - "parent": "/_public" - }, - "/_public/login": { - "filePath": "_public/login.tsx", - "parent": "/_public" - }, - "/_public/logout": { - "filePath": "_public/logout.tsx", - "parent": "/_public" - }, - "/_public/oidc-callback": { - "filePath": "_public/oidc-callback.tsx", - "parent": "/_public" - }, - "/_auth/agreements": { - "filePath": "_auth/(agreements)/agreements.tsx", - "parent": "/_auth", - "children": [ - "/_auth/agreements/$agreementId", - "/_auth/agreements/new", - "/_auth/agreements/" - ] - }, - "/_auth/customers": { - "filePath": "_auth/(customers)/customers.tsx", - "parent": "/_auth", - "children": [ - "/_auth/customers/$customerId", - "/_auth/customers/new", - "/_auth/customers/" - ] - }, - "/_auth/fleet": { - "filePath": "_auth/(fleet)/fleet.tsx", - "parent": "/_auth", - "children": [ - "/_auth/fleet/$vehicleId", - "/_auth/fleet/new", - "/_auth/fleet/" - ] - }, - "/_auth/reservations": { - "filePath": "_auth/(reservations)/reservations.tsx", - "parent": "/_auth", - "children": [ - "/_auth/reservations/$reservationId", - "/_auth/reservations/new", - "/_auth/reservations/" - ] - }, - "/_auth/settings": { - "filePath": "_auth/(settings)/settings.tsx", - "parent": "/_auth", - "children": [ - "/_auth/settings/application", - "/_auth/settings/profile", - "/_auth/settings/rates-and-charges", - "/_auth/settings/runtime-configuration", - "/_auth/settings/vehicles-and-categories", - "/_auth/settings/" - ] - }, - "/_auth/": { - "filePath": "_auth/(dashboard)/index.tsx", - "parent": "/_auth" - }, - "/_auth/agreements/$agreementId": { - "filePath": "_auth/(agreements)/agreements.$agreementId.tsx", - "parent": "/_auth/agreements", - "children": [ - "/_auth/agreements/$agreementId/_details", - "/_auth/agreements/$agreementId/check-in", - "/_auth/agreements/$agreementId/edit" - ] - }, - "/_auth/agreements/new": { - "filePath": "_auth/(agreements)/agreements.new.tsx", - "parent": "/_auth/agreements" - }, - "/_auth/customers/$customerId": { - "filePath": "_auth/(customers)/customers.$customerId.tsx", - "parent": "/_auth/customers", - "children": [ - "/_auth/customers/$customerId/_details", - "/_auth/customers/$customerId/edit" - ] - }, - "/_auth/customers/new": { - "filePath": "_auth/(customers)/customers.new.tsx", - "parent": "/_auth/customers" - }, - "/_auth/fleet/$vehicleId": { - "filePath": "_auth/(fleet)/fleet.$vehicleId.tsx", - "parent": "/_auth/fleet", - "children": [ - "/_auth/fleet/$vehicleId/_details", - "/_auth/fleet/$vehicleId/edit" - ] - }, - "/_auth/fleet/new": { - "filePath": "_auth/(fleet)/fleet.new.tsx", - "parent": "/_auth/fleet" - }, - "/_auth/reservations/$reservationId": { - "filePath": "_auth/(reservations)/reservations.$reservationId.tsx", - "parent": "/_auth/reservations", - "children": [ - "/_auth/reservations/$reservationId/_details", - "/_auth/reservations/$reservationId/edit" - ] - }, - "/_auth/reservations/new": { - "filePath": "_auth/(reservations)/reservations.new.tsx", - "parent": "/_auth/reservations" - }, - "/_auth/settings/application": { - "filePath": "_auth/(settings)/settings.application.tsx", - "parent": "/_auth/settings", - "children": [ - "/_auth/settings/application/locations", - "/_auth/settings/application/permissions-and-roles", - "/_auth/settings/application/store-hours-and-holidays", - "/_auth/settings/application/users", - "/_auth/settings/application/" - ] - }, - "/_auth/settings/profile": { - "filePath": "_auth/(settings)/settings.profile.tsx", - "parent": "/_auth/settings" - }, - "/_auth/settings/rates-and-charges": { - "filePath": "_auth/(settings)/settings.rates-and-charges.tsx", - "parent": "/_auth/settings" - }, - "/_auth/settings/runtime-configuration": { - "filePath": "_auth/(settings)/settings.runtime-configuration.tsx", - "parent": "/_auth/settings" - }, - "/_auth/settings/vehicles-and-categories": { - "filePath": "_auth/(settings)/settings.vehicles-and-categories.tsx", - "parent": "/_auth/settings" - }, - "/_auth/agreements/": { - "filePath": "_auth/(agreements)/agreements.index.tsx", - "parent": "/_auth/agreements" - }, - "/_auth/customers/": { - "filePath": "_auth/(customers)/customers.index.tsx", - "parent": "/_auth/customers" - }, - "/_auth/fleet/": { - "filePath": "_auth/(fleet)/fleet.index.tsx", - "parent": "/_auth/fleet" - }, - "/_auth/reports/": { - "filePath": "_auth/(reports)/reports.index.tsx", - "parent": "/_auth" - }, - "/_auth/reservations/": { - "filePath": "_auth/(reservations)/reservations.index.tsx", - "parent": "/_auth/reservations" - }, - "/_auth/settings/": { - "filePath": "_auth/(settings)/settings.index.tsx", - "parent": "/_auth/settings" - }, - "/_auth/agreements/$agreementId/_details": { - "filePath": "_auth/(agreements)/agreements.$agreementId._details.tsx", - "parent": "/_auth/agreements/$agreementId", - "children": [ - "/_auth/agreements/$agreementId/_details/exchanges", - "/_auth/agreements/$agreementId/_details/notes", - "/_auth/agreements/$agreementId/_details/summary", - "/_auth/agreements/$agreementId/_details/" - ] - }, - "/_auth/agreements/$agreementId/check-in": { - "filePath": "_auth/(agreements)/agreements.$agreementId.check-in.tsx", - "parent": "/_auth/agreements/$agreementId" - }, - "/_auth/agreements/$agreementId/edit": { - "filePath": "_auth/(agreements)/agreements.$agreementId.edit.tsx", - "parent": "/_auth/agreements/$agreementId" - }, - "/_auth/customers/$customerId/_details": { - "filePath": "_auth/(customers)/customers.$customerId._details.tsx", - "parent": "/_auth/customers/$customerId", - "children": [ - "/_auth/customers/$customerId/_details/notes", - "/_auth/customers/$customerId/_details/summary", - "/_auth/customers/$customerId/_details/" - ] - }, - "/_auth/customers/$customerId/edit": { - "filePath": "_auth/(customers)/customers.$customerId.edit.tsx", - "parent": "/_auth/customers/$customerId" - }, - "/_auth/fleet/$vehicleId/_details": { - "filePath": "_auth/(fleet)/fleet.$vehicleId._details.tsx", - "parent": "/_auth/fleet/$vehicleId", - "children": [ - "/_auth/fleet/$vehicleId/_details/agreements", - "/_auth/fleet/$vehicleId/_details/notes", - "/_auth/fleet/$vehicleId/_details/reservations", - "/_auth/fleet/$vehicleId/_details/summary", - "/_auth/fleet/$vehicleId/_details/" - ] - }, - "/_auth/fleet/$vehicleId/edit": { - "filePath": "_auth/(fleet)/fleet.$vehicleId.edit.tsx", - "parent": "/_auth/fleet/$vehicleId" - }, - "/_auth/reservations/$reservationId/_details": { - "filePath": "_auth/(reservations)/reservations.$reservationId._details.tsx", - "parent": "/_auth/reservations/$reservationId", - "children": [ - "/_auth/reservations/$reservationId/_details/notes", - "/_auth/reservations/$reservationId/_details/summary", - "/_auth/reservations/$reservationId/_details/" - ] - }, - "/_auth/reservations/$reservationId/edit": { - "filePath": "_auth/(reservations)/reservations.$reservationId.edit.tsx", - "parent": "/_auth/reservations/$reservationId" - }, - "/_auth/settings/application/locations": { - "filePath": "_auth/(settings)/settings.application.locations.tsx", - "parent": "/_auth/settings/application" - }, - "/_auth/settings/application/permissions-and-roles": { - "filePath": "_auth/(settings)/settings.application.permissions-and-roles.tsx", - "parent": "/_auth/settings/application" - }, - "/_auth/settings/application/store-hours-and-holidays": { - "filePath": "_auth/(settings)/settings.application.store-hours-and-holidays.tsx", - "parent": "/_auth/settings/application" - }, - "/_auth/settings/application/users": { - "filePath": "_auth/(settings)/settings.application.users.tsx", - "parent": "/_auth/settings/application" - }, - "/_auth/reports/$reportId/": { - "filePath": "_auth/(reports)/reports.$reportId.index.tsx", - "parent": "/_auth" - }, - "/_auth/settings/application/": { - "filePath": "_auth/(settings)/settings.application.index.tsx", - "parent": "/_auth/settings/application" - }, - "/_auth/agreements/$agreementId/_details/exchanges": { - "filePath": "_auth/(agreements)/agreements.$agreementId._details.exchanges.tsx", - "parent": "/_auth/agreements/$agreementId/_details" - }, - "/_auth/agreements/$agreementId/_details/notes": { - "filePath": "_auth/(agreements)/agreements.$agreementId._details.notes.tsx", - "parent": "/_auth/agreements/$agreementId/_details" - }, - "/_auth/agreements/$agreementId/_details/summary": { - "filePath": "_auth/(agreements)/agreements.$agreementId._details.summary.tsx", - "parent": "/_auth/agreements/$agreementId/_details" - }, - "/_auth/customers/$customerId/_details/notes": { - "filePath": "_auth/(customers)/customers.$customerId._details.notes.tsx", - "parent": "/_auth/customers/$customerId/_details" - }, - "/_auth/customers/$customerId/_details/summary": { - "filePath": "_auth/(customers)/customers.$customerId._details.summary.tsx", - "parent": "/_auth/customers/$customerId/_details" - }, - "/_auth/fleet/$vehicleId/_details/agreements": { - "filePath": "_auth/(fleet)/fleet.$vehicleId._details.agreements.tsx", - "parent": "/_auth/fleet/$vehicleId/_details" - }, - "/_auth/fleet/$vehicleId/_details/notes": { - "filePath": "_auth/(fleet)/fleet.$vehicleId._details.notes.tsx", - "parent": "/_auth/fleet/$vehicleId/_details" - }, - "/_auth/fleet/$vehicleId/_details/reservations": { - "filePath": "_auth/(fleet)/fleet.$vehicleId._details.reservations.tsx", - "parent": "/_auth/fleet/$vehicleId/_details" - }, - "/_auth/fleet/$vehicleId/_details/summary": { - "filePath": "_auth/(fleet)/fleet.$vehicleId._details.summary.tsx", - "parent": "/_auth/fleet/$vehicleId/_details" - }, - "/_auth/reservations/$reservationId/_details/notes": { - "filePath": "_auth/(reservations)/reservations.$reservationId._details.notes.tsx", - "parent": "/_auth/reservations/$reservationId/_details" - }, - "/_auth/reservations/$reservationId/_details/summary": { - "filePath": "_auth/(reservations)/reservations.$reservationId._details.summary.tsx", - "parent": "/_auth/reservations/$reservationId/_details" - }, - "/_auth/agreements/$agreementId/_details/": { - "filePath": "_auth/(agreements)/agreements.$agreementId._details.index.tsx", - "parent": "/_auth/agreements/$agreementId/_details" - }, - "/_auth/customers/$customerId/_details/": { - "filePath": "_auth/(customers)/customers.$customerId._details.index.tsx", - "parent": "/_auth/customers/$customerId/_details" - }, - "/_auth/fleet/$vehicleId/_details/": { - "filePath": "_auth/(fleet)/fleet.$vehicleId._details.index.tsx", - "parent": "/_auth/fleet/$vehicleId/_details" - }, - "/_auth/reservations/$reservationId/_details/": { - "filePath": "_auth/(reservations)/reservations.$reservationId._details.index.tsx", - "parent": "/_auth/reservations/$reservationId/_details" - } - } -} -ROUTE_MANIFEST_END */ diff --git a/src/routes/_auth/(agreements)/agreements.$agreementId._details.index.tsx b/src/routes/_auth/(agreements)/agreements.$agreementId._details._index.tsx similarity index 100% rename from src/routes/_auth/(agreements)/agreements.$agreementId._details.index.tsx rename to src/routes/_auth/(agreements)/agreements.$agreementId._details._index.tsx diff --git a/src/routes/_auth/(agreements)/agreements.index.tsx b/src/routes/_auth/(agreements)/agreements._index.tsx similarity index 100% rename from src/routes/_auth/(agreements)/agreements.index.tsx rename to src/routes/_auth/(agreements)/agreements._index.tsx diff --git a/src/routes/_auth/(customers)/customers.$customerId._details.index.tsx b/src/routes/_auth/(customers)/customers.$customerId._details._index.tsx similarity index 100% rename from src/routes/_auth/(customers)/customers.$customerId._details.index.tsx rename to src/routes/_auth/(customers)/customers.$customerId._details._index.tsx diff --git a/src/routes/_auth/(customers)/customers.index.tsx b/src/routes/_auth/(customers)/customers._index.tsx similarity index 100% rename from src/routes/_auth/(customers)/customers.index.tsx rename to src/routes/_auth/(customers)/customers._index.tsx diff --git a/src/routes/_auth/(dashboard)/index.tsx b/src/routes/_auth/(dashboard)/_index.tsx similarity index 100% rename from src/routes/_auth/(dashboard)/index.tsx rename to src/routes/_auth/(dashboard)/_index.tsx diff --git a/src/routes/_auth/(fleet)/fleet.$vehicleId._details.index.tsx b/src/routes/_auth/(fleet)/fleet.$vehicleId._details._index.tsx similarity index 100% rename from src/routes/_auth/(fleet)/fleet.$vehicleId._details.index.tsx rename to src/routes/_auth/(fleet)/fleet.$vehicleId._details._index.tsx diff --git a/src/routes/_auth/(fleet)/fleet.index.tsx b/src/routes/_auth/(fleet)/fleet._index.tsx similarity index 100% rename from src/routes/_auth/(fleet)/fleet.index.tsx rename to src/routes/_auth/(fleet)/fleet._index.tsx diff --git a/src/routes/_auth/(reports)/reports.$reportId.index.tsx b/src/routes/_auth/(reports)/reports.$reportId._index.tsx similarity index 100% rename from src/routes/_auth/(reports)/reports.$reportId.index.tsx rename to src/routes/_auth/(reports)/reports.$reportId._index.tsx diff --git a/src/routes/_auth/(reports)/reports.index.tsx b/src/routes/_auth/(reports)/reports._index.tsx similarity index 100% rename from src/routes/_auth/(reports)/reports.index.tsx rename to src/routes/_auth/(reports)/reports._index.tsx diff --git a/src/routes/_auth/(reservations)/reservations.$reservationId._details.index.tsx b/src/routes/_auth/(reservations)/reservations.$reservationId._details._index.tsx similarity index 100% rename from src/routes/_auth/(reservations)/reservations.$reservationId._details.index.tsx rename to src/routes/_auth/(reservations)/reservations.$reservationId._details._index.tsx diff --git a/src/routes/_auth/(reservations)/reservations.index.tsx b/src/routes/_auth/(reservations)/reservations._index.tsx similarity index 100% rename from src/routes/_auth/(reservations)/reservations.index.tsx rename to src/routes/_auth/(reservations)/reservations._index.tsx diff --git a/src/routes/_auth/(settings)/settings.index.tsx b/src/routes/_auth/(settings)/settings._index.tsx similarity index 100% rename from src/routes/_auth/(settings)/settings.index.tsx rename to src/routes/_auth/(settings)/settings._index.tsx diff --git a/src/routes/_auth/(settings)/settings.application.index.tsx b/src/routes/_auth/(settings)/settings.application._index.tsx similarity index 100% rename from src/routes/_auth/(settings)/settings.application.index.tsx rename to src/routes/_auth/(settings)/settings.application._index.tsx diff --git a/vite.config.ts b/vite.config.ts index 80a31de6..e91097c4 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,7 +1,7 @@ import cp from "node:child_process"; import path from "node:path"; import { TanStackRouterVite } from "@tanstack/router-plugin/vite"; -import react from "@vitejs/plugin-react"; +import viteReact from "@vitejs/plugin-react"; import { defineConfig } from "vite"; import packageJson from "./package.json"; @@ -14,7 +14,7 @@ const commitHash = cp const APP_VERSION = `${packageJson.version}-${commitHash}`; // https://vitejs.dev/config/ -export default defineConfig(() => { +export default defineConfig(({ command }) => { return { plugins: [ TanStackRouterVite({ @@ -23,8 +23,11 @@ export default defineConfig(() => { routeFileIgnorePrefix: "-", quoteStyle: "double", autoCodeSplitting: true, + indexToken: "_index", + routeToken: "_route", + disableManifestGeneration: true, }), - react({ + viteReact({ babel: { plugins: [ [ @@ -44,7 +47,7 @@ export default defineConfig(() => { port: 3000, }, build: { - sourcemap: true, + sourcemap: command === "serve", }, define: { "import.meta.env.APP_VERSION": JSON.stringify(APP_VERSION),