Files
2024-06-28 20:46:38 +02:00

129 lines
6.1 KiB
TypeScript

import { vitePlugin as remix } from "@remix-run/dev";
import { installGlobals } from "@remix-run/node";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
installGlobals();
export default defineConfig({
plugins: [remix({
routes(defineRoutes) {
return defineRoutes((route) => {
// Index
route("/", "routes/_index.tsx", { index: true });
// Resources
route("/resource/checkouts", "routes/resource/checkouts.tsx");
// Inventory
route("inventory", "routes/inventory/layout.tsx", () => {
route("", "routes/inventory/route.tsx", { index: true });
route("drink/:id", "routes/inventory/drink.$id.tsx");
route("beer/:beerslug", "routes/inventory/beer.$beerslug.tsx");
route("wine/:wineslug", "routes/inventory/wine.$wineslug.tsx");
route("soda/:sodaslug", "routes/inventory/soda.$sodaslug.tsx");
route("cocktail/:cocktailslug", "routes/inventory/cocktail.$cocktailslug.tsx");
route("manufacturer/:id", "routes/inventory/manufacturer.$id.tsx");
route("stats", "routes/inventory/stats/route.tsx");
route("suggestions", "routes/inventory/suggestions/route.tsx");
});
// Scanner
route("scan", "routes/scan/layout.tsx", () => {
route("", "routes/scan/route.tsx", { index: true });
route("link/:barcode", "routes/scan/link.$barcode.tsx");
});
// Admin
route("admin", "routes/admin/layout.tsx", () => {
route("", "routes/admin/route.tsx", { index: true });
route("reports", "routes/admin/reports.tsx");
route("new", "routes/admin/new/route.tsx");
route("new/country", "routes/admin/new/country.tsx");
route("new/section", "routes/admin/new/section.tsx");
route("new/beerstyle", "routes/admin/new/beerstyle.tsx");
route("new/winestyle", "routes/admin/new/winestyle.tsx");
route("new/beer", "routes/admin/new/beer.tsx");
route("new/wine", "routes/admin/new/wine.tsx");
route("new/soda", "routes/admin/new/soda.tsx");
route("new/cocktail", "routes/admin/new/cocktail.tsx");
route("new/container", "routes/admin/new/container.tsx");
route("new/manufacturer","routes/admin/new/manufacturer.tsx");
route("new/checkout", "routes/admin/new/checkout.tsx");
route("new/report", "routes/admin/new/report.tsx");
route("edit", "routes/admin/edit/route.tsx");
route("edit/country", "routes/admin/edit/country.tsx");
route("edit/country/:code", "routes/admin/edit/country.$code.tsx");
route("remove/country/:code", "routes/admin/edit/remove/country.$code.tsx");
route("edit/section", "routes/admin/edit/section.tsx");
route("edit/section/:id", "routes/admin/edit/section.$id.tsx");
route("remove/section/:id", "routes/admin/edit/remove/section.$id.tsx");
route("edit/beerstyle", "routes/admin/edit/beerstyle.tsx");
route("edit/beerstyle/:id", "routes/admin/edit/beerstyle.$id.tsx");
route("remove/beerstyle/:id", "routes/admin/edit/remove/beerstyle.$id.tsx");
route("edit/winestyle", "routes/admin/edit/winestyle.tsx");
route("edit/winestyle/:id", "routes/admin/edit/winestyle.$id.tsx");
route("remove/winestyle/:id", "routes/admin/edit/remove/winestyle.$id.tsx");
route("edit/manufacturer", "routes/admin/edit/manufacturer.tsx");
route("edit/manufacturer/:id", "routes/admin/edit/manufacturer.$id.tsx");
route("remove/manufacturer/:id", "routes/admin/edit/remove/manufacturer.$id.tsx");
route("edit/image/manufacturer/:id", "routes/admin/edit/image/manufacturer.$id.tsx");
route("edit/beer", "routes/admin/edit/beer.tsx");
route("edit/beer/:id", "routes/admin/edit/beer.$id.tsx");
route("remove/beer/:id", "routes/admin/edit/remove/beer.$id.tsx");
route("edit/image/beer/:id", "routes/admin/edit/image/beer.$id.tsx");
route("edit/wine", "routes/admin/edit/wine.tsx");
route("edit/wine/:id", "routes/admin/edit/wine.$id.tsx");
route("remove/wine/:id", "routes/admin/edit/remove/wine.$id.tsx");
route("edit/image/wine/:id", "routes/admin/edit/image/wine.$id.tsx");
route("edit/soda", "routes/admin/edit/soda.tsx");
route("edit/soda/:id", "routes/admin/edit/soda.$id.tsx");
route("remove/soda/:id", "routes/admin/edit/remove/soda.$id.tsx");
route("edit/image/soda/:id", "routes/admin/edit/image/soda.$id.tsx");
route("edit/cocktail", "routes/admin/edit/cocktail.tsx");
route("edit/cocktail/:id", "routes/admin/edit/cocktail.$id.tsx");
route("remove/cocktail/:id", "routes/admin/edit/remove/cocktail.$id.tsx");
route("edit/image/cocktail/:id", "routes/admin/edit/image/cocktail.$id.tsx");
route("edit/container", "routes/admin/edit/container.tsx");
route("edit/container/:id", "routes/admin/edit/container.$id.tsx");
route("remove/container/:id", "routes/admin/edit/remove/container.$id.tsx");
route("edit/checkout", "routes/admin/edit/checkout.tsx");
route("edit/checkout/:id", "routes/admin/edit/checkout.$id.tsx");
route("remove/checkout/:id", "routes/admin/edit/remove/checkout.$id.tsx");
route("remove/checkouts/:containerid", "routes/admin/edit/remove/checkouts.$containerid.tsx");
route("remove/suggestion/:id", "routes/admin/edit/remove/suggestion.$id.tsx");
route("resolve/suggestion/:id", "routes/admin/edit/suggestion.$id.tsx");
route("remove/report/:id", "routes/admin/edit/remove/report.$id.tsx");
route("manage/inventory", "routes/admin/manage/inventory.tsx");
route("manage/checkout", "routes/admin/manage/checkout.tsx");
});
});
},
}), tsconfigPaths()],
});