11f4c0537d
Build and push image / build (push) Successful in 1m25s
Replace the cramped horizontal sidebar with a 5-tab bottom nav (Home, Inventory, Scan, Custody, More) with an elevated scan button. Convert the 10-column inventory table to card-based list on mobile with scrollable filter pills and long-press selection. Add full-screen camera barcode scanner using html5-qrcode with post-scan action sheet. Set up PWA with vite-plugin-pwa for add-to-home-screen. Convert modals to bottom sheets, add pull-to-refresh, safe-area padding, and iOS input zoom fix. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
63 lines
1.7 KiB
TypeScript
63 lines
1.7 KiB
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import { VitePWA } from "vite-plugin-pwa";
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
VitePWA({
|
|
registerType: "autoUpdate",
|
|
manifest: {
|
|
name: "Apothecary",
|
|
short_name: "Apothecary",
|
|
description: "Personal cannabis inventory tracker",
|
|
theme_color: "#f5efe6",
|
|
background_color: "#f5efe6",
|
|
display: "standalone",
|
|
scope: "/",
|
|
start_url: "/",
|
|
icons: [
|
|
{ src: "/icons/icon-192.svg", sizes: "192x192", type: "image/svg+xml" },
|
|
{ src: "/icons/icon-512.svg", sizes: "512x512", type: "image/svg+xml" },
|
|
{ src: "/icons/maskable-512.svg", sizes: "512x512", type: "image/svg+xml", purpose: "maskable" },
|
|
],
|
|
},
|
|
workbox: {
|
|
globPatterns: ["**/*.{js,css,html,woff2}"],
|
|
runtimeCaching: [
|
|
{
|
|
urlPattern: /^https:\/\/fonts\.googleapis\.com/,
|
|
handler: "CacheFirst",
|
|
options: { cacheName: "google-fonts-stylesheets" },
|
|
},
|
|
{
|
|
urlPattern: /^https:\/\/fonts\.gstatic\.com/,
|
|
handler: "CacheFirst",
|
|
options: {
|
|
cacheName: "google-fonts-webfonts",
|
|
expiration: { maxEntries: 10 },
|
|
},
|
|
},
|
|
{
|
|
urlPattern: /\/api\//,
|
|
handler: "NetworkFirst",
|
|
options: {
|
|
cacheName: "api-cache",
|
|
networkTimeoutSeconds: 5,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
}),
|
|
],
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
"/api": {
|
|
target: "http://localhost:4000",
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
});
|