Rimuove le dipendenze da Lovable: l'app non gira più nel suo editor
Tolti il login social e il reporting errori verso l'editor Lovable (codice morto, mai importato o no-op in produzione), la cartella .lovable/ con i piani dell'editor, e riscritto vite.config.ts senza il preset @lovable.dev/vite-tanstack-config, esplicitando gli stessi plugin (TanStack Start, Tailwind, tsconfig-paths, React, Nitro/cloudflare) che forniva. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d52ceeb0f9
commit
abd6fafc0c
16 files changed
+93
-397
No files matched your search
@@ -1,38 +0,0 @@
|
|||||||
# Obiettivi di squadra: sezione in Squadra + widget in home
|
|
||||||
|
|
||||||
## Stato attuale
|
|
||||||
|
|
||||||
Al momento c'è un solo "obiettivo di squadra" ed è hardcoded nella home (`src/routes/index.tsx`, riga 136): **"90% di presenze ad agosto"** con una barra finta all'82%. Non esiste uno schema dati né una sezione dedicata, e non è collegato a calendario, presenze o statistiche. Le voci "obiettivi" nelle descrizioni di Squadra e Profilo si riferiscono ai badge individuali, non a obiettivi di squadra.
|
|
||||||
|
|
||||||
## Cosa faccio
|
|
||||||
|
|
||||||
1. **Modello dati locale** in `src/lib/crapp-data.ts`
|
|
||||||
|
|
||||||
- Nuovo tipo `ObiettivoSquadra`: id, titolo, descrizione, target, valore attuale, unità, scadenza (opzionale), icona.
|
|
||||||
- Array `obiettiviSquadra` con gli obiettivi demo della stagione.
|
|
||||||
|
|
||||||
2. **Sezione "Obiettivi di squadra" dentro la scheda Squadra** (`src/routes/squadra.tsx`)
|
|
||||||
|
|
||||||
- Nuova sezione con la lista completa degli obiettivi: barra di progresso, percentuale, stato (in corso / completato).
|
|
||||||
- Ordinati con gli obiettivi in corso in cima e i completati in fondo.
|
|
||||||
- Nessuna nuova rotta e nessuna modifica al bottom nav.
|
|
||||||
|
|
||||||
3. **Widget home dinamico** (`src/routes/index.tsx`)
|
|
||||||
|
|
||||||
- Sostituisce l'obiettivo hardcoded: mostra sempre il primo obiettivo in corso preso dalla lista.
|
|
||||||
- Progresso calcolato dai dati reali dove possibile (es. presenze derivate dagli eventi).
|
|
||||||
|
|
||||||
4. **Obiettivi demo iniziali**
|
|
||||||
|
|
||||||
- 90% di presenze ad agosto (collegato agli eventi di agosto).
|
|
||||||
- 70% di risposte entro 24h nel prossimo mese.
|
|
||||||
- Prima vittoria del campionato (collegato allo storico match).
|
|
||||||
- 5 vittorie in campionato (collegato allo storico match).
|
|
||||||
- 10 vittorie in campionato (collegato allo storico match).
|
|
||||||
- 1 evento di squadra al mese (pizzata, ecc.).
|
|
||||||
|
|
||||||
## Cosa non cambia
|
|
||||||
|
|
||||||
- Resta un prototipo offline: i dati restano in `src/lib/crapp-data.ts`.
|
|
||||||
- I badge individuali restano come sono in `src/lib/badges.ts` e nella rosa di `src/routes/squadra.tsx`.
|
|
||||||
- Bottom nav e rotte invariate.
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
# Rendere CrAPP operativa: migrazione dal prototipo al Cloud
|
|
||||||
|
|
||||||
## Stato attuale
|
|
||||||
|
|
||||||
L'app è un prototipo UI con alcune funzioni già collegate a Lovable Cloud:
|
|
||||||
|
|
||||||
- Già sul Cloud: voti MVP (`mvp_voti`), iscrizioni push (`push_subscriptions`), sessioni scout (`scout_sessioni`), turni palloni (`turni_palloni`).
|
|
||||||
- Ancora in locale come dati demo: rosa giocatori, calendario eventi, storico partite, classifica CSI, statistiche individuali, presenze/assenze, badge.
|
|
||||||
|
|
||||||
## Cosa serve per renderla operativa
|
|
||||||
|
|
||||||
1. **Rosa e profili giocatori sul database**
|
|
||||||
- Creare tabella `profiles` (o `giocatori`) con nome, numero maglia, ruolo, data di nascita, foto profilo.
|
|
||||||
- Collegare ogni riga all'utente autenticato corrispondente.
|
|
||||||
- Rimuovere la rosa statica da `src/lib/crapp-data.ts` e caricarla dal backend.
|
|
||||||
|
|
||||||
2. **Autenticazione reale**
|
|
||||||
- Sostituire la semplice selezione "Chi sei?" in `localStorage` con login email/password o OAuth (Google).
|
|
||||||
- Ogni giocatore accede con le proprie credenziali e vede solo i propri dati modificabili.
|
|
||||||
- Necessaria per garantire che uno scout o un voto MVP provenga davvero da quel giocatore.
|
|
||||||
|
|
||||||
3. **Calendario eventi persistente**
|
|
||||||
- Tabella `eventi` con tipo, titolo, data, ora, luogo, avversario, casa/fuori.
|
|
||||||
- Tabella `presenze` (evento_id, giocatore_id, stato, aggiornato_il).
|
|
||||||
- I compleanni possono restare derivati dalla data di nascita dei giocatori.
|
|
||||||
|
|
||||||
4. **Statistiche e badge dinamici**
|
|
||||||
- Tabella `statistiche` o `azioni_scout` (evento_id, giocatore_id, tipo azione, valore, creato_il).
|
|
||||||
- I badge vengono calcolati in tempo reale dalle statistiche accumulate, senza valori fissi in `crapp-data.ts`.
|
|
||||||
|
|
||||||
5. **Scout live collegato ai dati reali**
|
|
||||||
- Le azioni registrate in `scout.tsx` devono scrivere sulle tabelle eventi/statistiche.
|
|
||||||
- Mantenere il lock di modifica singolo e l'attivazione solo il giorno della partita.
|
|
||||||
|
|
||||||
6. **Classifica CSI**
|
|
||||||
- Tabella `classifica` aggiornata manualmente da un admin o importata dal sito CSI quando disponibile.
|
|
||||||
- Per ora nessuna API CSI ufficiale: si inserisce a mano o si copia/incolla.
|
|
||||||
|
|
||||||
7. **Notifiche push definitive**
|
|
||||||
- Verificare che i cron job inviino correttamente i promemoria palloni.
|
|
||||||
- Aggiungere notifiche per conferma eventi, promemoria presenze, MVP votabile.
|
|
||||||
|
|
||||||
8. **Ruoli e permessi**
|
|
||||||
- Definire chi può creare/modificare eventi (capitano/admin).
|
|
||||||
- Chi può fare scout (designato per partita).
|
|
||||||
- Chi può modificare i turni palloni (tutti, come da tua richiesta).
|
|
||||||
|
|
||||||
## Cosa resta salvato nel Cloud
|
|
||||||
|
|
||||||
Sì: tutto ciò che viene scritto sulle tabelle Lovable Cloud/Supabase resta salvato online e condiviso tra tutti i dispositivi.
|
|
||||||
|
|
||||||
I dati demo in `src/lib/crapp-data.ts` invece no: sono file statici, quindi ogni aggiornamento dell'app li sovrascrive e ogni telefono li vede identici.
|
|
||||||
|
|
||||||
## Decisioni da prendere insieme
|
|
||||||
|
|
||||||
- Vuoi abilitare login email/password per ogni giocatore, o preferisci mantenere la selezione "Chi sei?" senza password per semplicità?
|
|
||||||
- Chi gestirà inserimento eventi e aggiornamento classifica: solo alcuni o tutta la squadra?
|
|
||||||
- Vuoi procedere per fasi (prima rosa + calendario + presenze, poi statistiche) o tutto insieme?
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# Ridimensionamento badge nella lista squadra
|
|
||||||
|
|
||||||
## Obiettivo
|
|
||||||
|
|
||||||
Rendere i badge accanto al nome del giocatore nella lista squadra più compatti e meno invasivi, mantenendo lo stile stilizzato (icone Lucide colorate per grado) e lasciando la scheda espansa con una dimensione leggibile.
|
|
||||||
|
|
||||||
## Modifiche previste
|
|
||||||
|
|
||||||
1. **Lista squadra (`src/routes/squadra.tsx`)**
|
|
||||||
- Ridurre le icone badge sbloccati mostrate accanto al nome da `h-4 w-4` (16px) a `h-3 w-3` (12px).
|
|
||||||
- Mantenere il massimo di 3 badge visibili e il contatore `+N` con testo ridotto a `text-[9px]` per armonizzare.
|
|
||||||
- Lasciare invariati avatar, nome, ruolo ed età.
|
|
||||||
|
|
||||||
2. **Scheda giocatore espansa (`src/routes/squadra.tsx`)**
|
|
||||||
- Portare le icone badge dalla dimensione attuale a `h-4 w-4` (16px), leggibili ma non troppo grandi.
|
|
||||||
- Mantenere card, colori per grado (bronzo/argento/oro) e testi descrittivi.
|
|
||||||
|
|
||||||
3. **Verifica**
|
|
||||||
- Controllare la preview su `/squadra` per confermare che i badge in lista siano discreti e la scheda espansa rimanga leggibile.
|
|
||||||
- Eseguire build per assicurarsi che non ci siano errori di tipo o stile.
|
|
||||||
|
|
||||||
## Cosa non cambia
|
|
||||||
|
|
||||||
- Colori dei gradi, soglie badge, logica di sblocco e votazione MVP.
|
|
||||||
- Layout generale della pagina e bottom navigation.
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# Rimuovere placeholder "Livello 7" dal Profilo
|
|
||||||
|
|
||||||
## Obiettivo
|
|
||||||
|
|
||||||
Eliminare il testo statico "Livello 7" dalla scheda profilo, dato che non è collegato a nessun calcolo reale e l'utente preferisce toglierlo per ora.
|
|
||||||
|
|
||||||
## Modifica
|
|
||||||
|
|
||||||
- `src/routes/profilo.tsx`: rimuovere il paragrafo `<p className="font-display text-2xl leading-none">Livello 7</p>` (riga 116) e, se necessario, riallineare il layout circostante per evitare spazi vuoti strani.
|
|
||||||
|
|
||||||
## Verifica
|
|
||||||
|
|
||||||
- Build senza errori.
|
|
||||||
- Preview della pagina Profilo: nessun riferimento a "Livello" visibile.
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
# Selezione giocatore al primo avvio
|
|
||||||
|
|
||||||
Aggiungere un flusso di onboarding che chiede "Chi sei?" la prima volta che l'app viene aperta, memorizzando la scelta in `localStorage`. Il profilo e la home si aggiorneranno automaticamente in base al giocatore selezionato.
|
|
||||||
|
|
||||||
## Cosa cambia
|
|
||||||
|
|
||||||
1. **Nuovo store `src/lib/user-store.ts`**
|
|
||||||
- Persiste in `localStorage` l'`id` del giocatore scelto.
|
|
||||||
- Espone `useGiocatoreCorrente()` che restituisce il giocatore selezionato o `null`.
|
|
||||||
- Espone `impostaGiocatore(id)` e `resetGiocatore()`.
|
|
||||||
|
|
||||||
2. **Nuova route `/benvenuto`**
|
|
||||||
- Schermata full-screen con logo, titolo "Benvenuto in CrAPP" e lista scrollabile della rosa.
|
|
||||||
- Ogni riga mostra iniziali, nome, ruolo e numero maglia.
|
|
||||||
- Al tap su un giocatore, lo store viene aggiornato e l'utente viene portato a `/`.
|
|
||||||
- Non mostra la bottom navigation.
|
|
||||||
|
|
||||||
3. **Reindirizzamento condizionato in `__root.tsx`**
|
|
||||||
- Se non è ancora stato selezionato un giocatore, qualunque route apre `/benvenuto`.
|
|
||||||
- Dopo la scelta, l'app funziona normalmente.
|
|
||||||
|
|
||||||
4. **Sostituzione di `giocatoreCorrente` con `useGiocatoreCorrente()`**
|
|
||||||
- Aggiornare `src/routes/index.tsx` per salutare il giocatore selezionato e mostrarne le statistiche rapide.
|
|
||||||
- Aggiornare `src/routes/profilo.tsx` per renderlo il profilo personale del giocatore scelto.
|
|
||||||
|
|
||||||
5. **Cambio utente dalle impostazioni**
|
|
||||||
- In `src/routes/profilo.tsx`, aggiungere una voce "Cambia giocatore" che resetta la selezione e porta a `/benvenuto`.
|
|
||||||
|
|
||||||
## Note tecniche
|
|
||||||
|
|
||||||
- `localStorage` viene letto solo lato client, usando `useSyncExternalStore` per evitare mismatch di hydration.
|
|
||||||
- La rosa reale è già presente in `src/lib/crapp-data.ts` (`giocatori`).
|
|
||||||
- La costante esportata `giocatoreCorrente` verrà rimossa; i componenti consumeranno il nuovo hook.
|
|
||||||
- Nessun backend richiesto: resta un prototipo locale.
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
# Turno palloni nel calendario + promemoria
|
|
||||||
|
|
||||||
Aggiungere a ogni allenamento/partita un incaricato dei palloni, condiviso tra tutti, con rotazione automatica proposta dall'app e promemoria (in-app e push).
|
|
||||||
|
|
||||||
## Cosa vedrà la squadra
|
|
||||||
|
|
||||||
- **Riga "Palloni" su ogni evento** (allenamento e partita) nella card del calendario e in Home: avatar + nome dell'incaricato, oppure "Da assegnare".
|
|
||||||
- **Chiunque può cambiarlo**: tocco sulla riga, si apre la lista della rosa, si sceglie il nome. La modifica è immediata e visibile a tutti.
|
|
||||||
- **Proposta automatica a rotazione**: l'app suggerisce chi non ha ancora fatto il turno di recente (o è stato meno volte incaricato). Il suggerimento è solo una proposta: resta sempre modificabile.
|
|
||||||
- **Storico turni** nella scheda squadra/giocatore: quante volte ciascuno ha portato i palloni.
|
|
||||||
- **Due promemoria per l'incaricato**:
|
|
||||||
1. il giorno stesso dell'evento in cui li deve **prendere** a fine allenamento/partita;
|
|
||||||
2. il giorno dell'evento successivo, per ricordargli di **riportarli**.
|
|
||||||
- I promemoria arrivano come banner ben visibile in Home e, per chi attiva le notifiche, come notifica push sul telefono.
|
|
||||||
|
|
||||||
## Impostazione tecnica
|
|
||||||
|
|
||||||
**Backend (Lovable Cloud)**
|
|
||||||
|
|
||||||
- Attivazione di Lovable Cloud.
|
|
||||||
- Tabella `eventi` (spostando i dati demo attuali su database) o, in alternativa minima, tabella `turni_palloni` con `evento_id`, `giocatore_id`, `aggiornato_da`, `aggiornato_il`. Scelgo la seconda per limitare il refactor: gli eventi restano in `crapp-data.ts` finché non si passa a calendario dinamico.
|
|
||||||
- Tabella `push_subscriptions` (giocatore_id, endpoint, chiavi) per le notifiche.
|
|
||||||
- Grant espliciti + RLS: lettura e scrittura aperte a tutti gli utenti dell'app (nessun login previsto oggi → policy per `anon` limitate a queste tabelle, nessun dato personale sensibile).
|
|
||||||
- Server functions in `src/lib/palloni.functions.ts`: `getTurni`, `setTurno`, `suggerisciTurno`.
|
|
||||||
|
|
||||||
**Frontend**
|
|
||||||
|
|
||||||
- Nuovo componente `TurnoPalloni` usato in `EventoCard` e in Home.
|
|
||||||
- Lettura via TanStack Query (`ensureQueryData` nel loader, `useSuspenseQuery` nel componente), invalidazione dopo la modifica.
|
|
||||||
- Banner promemoria in Home basato su data odierna + evento successivo, mostrato solo al giocatore selezionato in `user-store`.
|
|
||||||
|
|
||||||
**Notifiche push**
|
|
||||||
|
|
||||||
- Service worker dedicato al messaging (separato dalla PWA esistente), chiavi VAPID salvate come secret.
|
|
||||||
- Schermata in Profilo: "Attiva notifiche palloni" con richiesta di permesso.
|
|
||||||
- Invio schedulato tramite un endpoint `src/routes/api/public/promemoria-palloni.ts` protetto da secret, richiamato una volta al giorno da un job pianificato (pg_cron).
|
|
||||||
- Nota: su iPhone le notifiche push funzionano solo se l'app è installata dalla schermata Home.
|
|
||||||
|
|
||||||
## Ordine di lavoro
|
|
||||||
|
|
||||||
1. Attivare Lovable Cloud e creare tabelle + policy.
|
|
||||||
2. Server functions + UI del turno palloni (assegnazione manuale condivisa).
|
|
||||||
3. Rotazione automatica suggerita + storico turni.
|
|
||||||
4. Banner promemoria in-app.
|
|
||||||
5. Notifiche push + job giornaliero.
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"schemaVersion": 1,
|
|
||||||
"template": "tanstack_start_ts_current",
|
|
||||||
"revision": "tanstack_start_ts_current-9e5645c506e5"
|
|
||||||
}
|
|
||||||
@@ -5,7 +5,6 @@
|
|||||||
"": {
|
"": {
|
||||||
"name": "crapp",
|
"name": "crapp",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@lovable.dev/cloud-auth-js": "^1.1.2",
|
|
||||||
"@supabase/supabase-js": "^2.111.0",
|
"@supabase/supabase-js": "^2.111.0",
|
||||||
"@tailwindcss/vite": "^4.2.1",
|
"@tailwindcss/vite": "^4.2.1",
|
||||||
"@tanstack/react-query": "^5.101.1",
|
"@tanstack/react-query": "^5.101.1",
|
||||||
@@ -27,7 +26,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "^9.32.0",
|
"@eslint/js": "^9.32.0",
|
||||||
"@lovable.dev/vite-tanstack-config": "2.8.5",
|
"@tanstack/devtools-vite": "^0.8.3",
|
||||||
"@types/canvas-confetti": "^1.9.0",
|
"@types/canvas-confetti": "^1.9.0",
|
||||||
"@types/node": "^22.16.5",
|
"@types/node": "^22.16.5",
|
||||||
"@types/react": "^19.2.0",
|
"@types/react": "^19.2.0",
|
||||||
@@ -130,14 +129,6 @@
|
|||||||
|
|
||||||
"@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.31", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw=="],
|
"@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.31", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw=="],
|
||||||
|
|
||||||
"@lovable.dev/cloud-auth-js": ["@lovable.dev/cloud-auth-js@1.1.2", "https://europe-west4-npm.pkg.dev/lovable-core-prod/sandbox-npm-cache/@lovable.dev/cloud-auth-js/-/cloud-auth-js-1.1.2.tgz", {}, "sha512-xz8ocewsgwkp8giau272/eWWU3XrchCg5uba4yQPPYtevHTXaVU3sD+fO1JjyPBHacVcOcwhmgUiU9TKHt63cg=="],
|
|
||||||
|
|
||||||
"@lovable.dev/vite-plugin-dev-server-bridge": ["@lovable.dev/vite-plugin-dev-server-bridge@1.2.1", "", { "peerDependencies": { "vite": ">=5.0.0 <9.0.0" } }, "sha512-JdADRwpEJA5t0ggXbd96dND23Wsp69Af9lVSV5m7MnMGxJZlPgqAqz7HUKcfJESfI5M5yFZOl9e0x76JMMDOAg=="],
|
|
||||||
|
|
||||||
"@lovable.dev/vite-plugin-hmr-gate": ["@lovable.dev/vite-plugin-hmr-gate@1.3.5", "https://europe-west1-npm.pkg.dev/lovable-core-prod/sandbox-npm-cache/@lovable.dev/vite-plugin-hmr-gate/-/vite-plugin-hmr-gate-1.3.5.tgz", { "peerDependencies": { "vite": ">=5.0.0 <9.0.0" } }, "sha512-LxCj6JIbYRQ6peMm2aVn/bhHLkwZ5eZ4Cn6gmh7LfjaplqZHlA24nhCowgt6ZLfbckc4d8tSy0He7H8EiFEXag=="],
|
|
||||||
|
|
||||||
"@lovable.dev/vite-tanstack-config": ["@lovable.dev/vite-tanstack-config@2.8.5", "https://europe-west1-npm.pkg.dev/lovable-core-prod/sandbox-npm-cache/@lovable.dev/vite-tanstack-config/-/vite-tanstack-config-2.8.5.tgz", { "dependencies": { "@lovable.dev/vite-plugin-dev-server-bridge": "^1.2.1", "@lovable.dev/vite-plugin-hmr-gate": "^1.3.4", "@tanstack/devtools-vite": "^0.8.1", "lightningcss": "^1.30.0" }, "peerDependencies": { "@tailwindcss/vite": ">=4.0.0", "@tanstack/react-start": ">=1.100.0", "@vitejs/plugin-react": ">=4.0.0", "nitro": ">=3.0.260603-beta", "vite": ">=5.0.0 <9.0.0", "vite-tsconfig-paths": ">=6.0.0" }, "optionalPeers": ["nitro"] }, "sha512-qPNxEXjvRsrbJHKgHxuLWpRW/gu2nIM+62qjTUCbCno5nRPMKyJQNsgjh48qjAkS6T0MRIkY/3BENNXeGsi5hw=="],
|
|
||||||
|
|
||||||
"@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@1.2.0", "", { "dependencies": { "@tybys/wasm-util": "^0.10.3" }, "peerDependencies": { "@emnapi/core": "^2.0.0-alpha.3", "@emnapi/runtime": "^2.0.0-alpha.3" } }, "sha512-kDoONqMa+VnZ4vvvu/ZUurpJ4gkZU57e7g69qpNgWhYcZFPUHZM2CEMKm+cG6ufDVALbjMvfmMjFVqaK7uEMnA=="],
|
"@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@1.2.0", "", { "dependencies": { "@tybys/wasm-util": "^0.10.3" }, "peerDependencies": { "@emnapi/core": "^2.0.0-alpha.3", "@emnapi/runtime": "^2.0.0-alpha.3" } }, "sha512-kDoONqMa+VnZ4vvvu/ZUurpJ4gkZU57e7g69qpNgWhYcZFPUHZM2CEMKm+cG6ufDVALbjMvfmMjFVqaK7uEMnA=="],
|
||||||
|
|
||||||
"@oozcitak/dom": ["@oozcitak/dom@2.0.2", "", { "dependencies": { "@oozcitak/infra": "^2.0.2", "@oozcitak/url": "^3.0.0", "@oozcitak/util": "^10.0.0" } }, "sha512-GjpKhkSYC3Mj4+lfwEyI1dqnsKTgwGy48ytZEhm4A/xnH/8z9M3ZVXKr/YGQi3uCLs1AEBS+x5T2JPiueEDW8w=="],
|
"@oozcitak/dom": ["@oozcitak/dom@2.0.2", "", { "dependencies": { "@oozcitak/infra": "^2.0.2", "@oozcitak/url": "^3.0.0", "@oozcitak/util": "^10.0.0" } }, "sha512-GjpKhkSYC3Mj4+lfwEyI1dqnsKTgwGy48ytZEhm4A/xnH/8z9M3ZVXKr/YGQi3uCLs1AEBS+x5T2JPiueEDW8w=="],
|
||||||
@@ -424,7 +415,7 @@
|
|||||||
|
|
||||||
"canvas-confetti": ["canvas-confetti@1.9.4", "https://europe-west1-npm.pkg.dev/lovable-core-prod/sandbox-npm-cache/canvas-confetti/-/canvas-confetti-1.9.4.tgz", {}, "sha512-yxQbJkAVrFXWNbTUjPqjF7G+g6pDotOUHGbkZq2NELZUMDpiJ85rIEazVb8GTaAptNW2miJAXbs1BtioA251Pw=="],
|
"canvas-confetti": ["canvas-confetti@1.9.4", "https://europe-west1-npm.pkg.dev/lovable-core-prod/sandbox-npm-cache/canvas-confetti/-/canvas-confetti-1.9.4.tgz", {}, "sha512-yxQbJkAVrFXWNbTUjPqjF7G+g6pDotOUHGbkZq2NELZUMDpiJ85rIEazVb8GTaAptNW2miJAXbs1BtioA251Pw=="],
|
||||||
|
|
||||||
"chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],
|
"chalk": ["chalk@5.6.2", "", {}, "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA=="],
|
||||||
|
|
||||||
"chokidar": ["chokidar@5.0.0", "", { "dependencies": { "readdirp": "^5.0.0" } }, "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw=="],
|
"chokidar": ["chokidar@5.0.0", "", { "dependencies": { "readdirp": "^5.0.0" } }, "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw=="],
|
||||||
|
|
||||||
@@ -800,10 +791,6 @@
|
|||||||
|
|
||||||
"@tailwindcss/oxide-wasm32-wasi/tslib": ["tslib@2.8.1", "", { "bundled": true }, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
"@tailwindcss/oxide-wasm32-wasi/tslib": ["tslib@2.8.1", "", { "bundled": true }, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||||
|
|
||||||
"@tanstack/devtools-bundler-core/chalk": ["chalk@5.6.2", "", {}, "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA=="],
|
|
||||||
|
|
||||||
"@tanstack/devtools-vite/chalk": ["chalk@5.6.2", "", {}, "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA=="],
|
|
||||||
|
|
||||||
"@tanstack/router-generator/zod": ["zod@4.4.3", "", {}, "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ=="],
|
"@tanstack/router-generator/zod": ["zod@4.4.3", "", {}, "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ=="],
|
||||||
|
|
||||||
"@tanstack/router-plugin/zod": ["zod@4.4.3", "", {}, "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ=="],
|
"@tanstack/router-plugin/zod": ["zod@4.4.3", "", {}, "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ=="],
|
||||||
@@ -820,6 +807,8 @@
|
|||||||
|
|
||||||
"@typescript-eslint/visitor-keys/eslint-visitor-keys": ["eslint-visitor-keys@5.0.1", "", {}, "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA=="],
|
"@typescript-eslint/visitor-keys/eslint-visitor-keys": ["eslint-visitor-keys@5.0.1", "", {}, "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA=="],
|
||||||
|
|
||||||
|
"eslint/chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],
|
||||||
|
|
||||||
"h3/srvx": ["srvx@0.12.4", "", { "bin": { "srvx": "bin/srvx.mjs" } }, "sha512-RixzFlMn3dvzDTpKIAXhXrqL4cy6vScNCP0VVwgVbUBU94o+DiXLsFnAZetbyKAEnK6Ox3hzHXWGsyv/Iibv7g=="],
|
"h3/srvx": ["srvx@0.12.4", "", { "bin": { "srvx": "bin/srvx.mjs" } }, "sha512-RixzFlMn3dvzDTpKIAXhXrqL4cy6vScNCP0VVwgVbUBU94o+DiXLsFnAZetbyKAEnK6Ox3hzHXWGsyv/Iibv7g=="],
|
||||||
|
|
||||||
"h3-v2/rou3": ["rou3@0.8.1", "", {}, "sha512-ePa+XGk00/3HuCqrEnK3LxJW7I0SdNg6EFzKUJG73hMAdDcOUC/i/aSz7LSDwLrGr33kal/rqOGydzwl6U7zBA=="],
|
"h3-v2/rou3": ["rou3@0.8.1", "", {}, "sha512-ePa+XGk00/3HuCqrEnK3LxJW7I0SdNg6EFzKUJG73hMAdDcOUC/i/aSz7LSDwLrGr33kal/rqOGydzwl6U7zBA=="],
|
||||||
|
|||||||
+1
-1
@@ -4,4 +4,4 @@ saveTextLockfile = true
|
|||||||
minimumReleaseAge = 86400
|
minimumReleaseAge = 86400
|
||||||
# Each entry bypasses the 24h guard for one package — confirm with the user
|
# Each entry bypasses the 24h guard for one package — confirm with the user
|
||||||
# before adding any.
|
# before adding any.
|
||||||
minimumReleaseAgeExcludes = ["@lovable.dev/vite-tanstack-config", "@lovable.dev/mcp-js", "@lovable.dev/vite-plugin-dev-server-bridge", "@lovable.dev/vite-plugin-hmr-gate", "@lovable.dev/email-js", "@lovable.dev/webhooks-js"]
|
minimumReleaseAgeExcludes = []
|
||||||
@@ -13,7 +13,6 @@ senza dipendere da servizi esclusivi di Lovable Cloud.
|
|||||||
| Client dati (`@supabase/supabase-js`) | Sì | Supabase è open source e self-hostable; in alternativa si sostituisce il solo livello dati (`src/lib/*.ts`). |
|
| Client dati (`@supabase/supabase-js`) | Sì | Supabase è open source e self-hostable; in alternativa si sostituisce il solo livello dati (`src/lib/*.ts`). |
|
||||||
| Web Push (`src/lib/webpush.server.ts`) | Sì | VAPID implementato con Web Crypto, disponibile in Node 18+. |
|
| Web Push (`src/lib/webpush.server.ts`) | Sì | VAPID implementato con Web Crypto, disponibile in Node 18+. |
|
||||||
| Auth | Sì | GoTrue self-hosted oppure qualsiasi provider OIDC. |
|
| Auth | Sì | GoTrue self-hosted oppure qualsiasi provider OIDC. |
|
||||||
| `src/integrations/lovable/*` | Opzionale | Login social gestito da Lovable: **non importato da nessuna schermata**, rimovibile senza impatti. |
|
|
||||||
| `@lovable.dev/vite-tanstack-config` | Solo build | Preset Vite; sostituibile con una config Vite/TanStack esplicita. |
|
| `@lovable.dev/vite-tanstack-config` | Solo build | Preset Vite; sostituibile con una config Vite/TanStack esplicita. |
|
||||||
|
|
||||||
## Regole da rispettare nelle prossime modifiche
|
## Regole da rispettare nelle prossime modifiche
|
||||||
|
|||||||
+1
-2
@@ -17,7 +17,6 @@
|
|||||||
"test:all": "bun test/run.ts all"
|
"test:all": "bun test/run.ts all"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@lovable.dev/cloud-auth-js": "^1.1.2",
|
|
||||||
"@supabase/supabase-js": "^2.111.0",
|
"@supabase/supabase-js": "^2.111.0",
|
||||||
"@tailwindcss/vite": "^4.2.1",
|
"@tailwindcss/vite": "^4.2.1",
|
||||||
"@tanstack/react-query": "^5.101.1",
|
"@tanstack/react-query": "^5.101.1",
|
||||||
@@ -39,7 +38,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "^9.32.0",
|
"@eslint/js": "^9.32.0",
|
||||||
"@lovable.dev/vite-tanstack-config": "2.8.5",
|
"@tanstack/devtools-vite": "^0.8.3",
|
||||||
"@types/canvas-confetti": "^1.9.0",
|
"@types/canvas-confetti": "^1.9.0",
|
||||||
"@types/node": "^22.16.5",
|
"@types/node": "^22.16.5",
|
||||||
"@types/react": "^19.2.0",
|
"@types/react": "^19.2.0",
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
// This file is auto-generated by Lovable. Do not modify it.
|
|
||||||
|
|
||||||
import { createLovableAuth } from "@lovable.dev/cloud-auth-js";
|
|
||||||
import { supabase } from "../supabase/client";
|
|
||||||
const lovableAuth = createLovableAuth();
|
|
||||||
|
|
||||||
type SignInOptions = {
|
|
||||||
redirect_uri?: string;
|
|
||||||
extraParams?: Record<string, string>;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const lovable = {
|
|
||||||
auth: {
|
|
||||||
signInWithOAuth: async (
|
|
||||||
provider: "google" | "apple" | "microsoft" | "lovable",
|
|
||||||
opts?: SignInOptions,
|
|
||||||
) => {
|
|
||||||
const result = await lovableAuth.signInWithOAuth(provider, {
|
|
||||||
redirect_uri: opts?.redirect_uri ?? window.location.origin,
|
|
||||||
extraParams: {
|
|
||||||
...opts?.extraParams,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
if (result.redirected) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result.error) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
await supabase.auth.setSession(result.tokens);
|
|
||||||
} catch (e) {
|
|
||||||
return { error: e instanceof Error ? e : new Error(String(e)) };
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
type LovableErrorOptions = {
|
|
||||||
mechanism?: "manual" | "onerror" | "unhandledrejection" | "react_error_boundary";
|
|
||||||
handled?: boolean;
|
|
||||||
severity?: "error" | "warning" | "info";
|
|
||||||
};
|
|
||||||
|
|
||||||
type LovableEvents = {
|
|
||||||
captureException?: (
|
|
||||||
error: unknown,
|
|
||||||
context?: Record<string, unknown>,
|
|
||||||
options?: LovableErrorOptions,
|
|
||||||
) => void;
|
|
||||||
};
|
|
||||||
|
|
||||||
declare global {
|
|
||||||
interface Window {
|
|
||||||
__lovableEvents?: LovableEvents;
|
|
||||||
__lovableReportRuntimeError?: (payload: {
|
|
||||||
message: string;
|
|
||||||
stack?: string;
|
|
||||||
filename?: string;
|
|
||||||
}) => void;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export function reportLovableError(error: unknown, context: Record<string, unknown> = {}) {
|
|
||||||
if (typeof window === "undefined") return;
|
|
||||||
window.__lovableEvents?.captureException?.(
|
|
||||||
error,
|
|
||||||
{
|
|
||||||
source: "react_error_boundary",
|
|
||||||
route: window.location.pathname,
|
|
||||||
...context,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
mechanism: "react_error_boundary",
|
|
||||||
handled: false,
|
|
||||||
severity: "error",
|
|
||||||
},
|
|
||||||
);
|
|
||||||
// Prod React does not rethrow boundary-caught errors to window.onerror, so the
|
|
||||||
// editor's telemetry never sees them. Forward to lovable.js's reporting hook,
|
|
||||||
// which is present only inside the editor preview.
|
|
||||||
// Loaders and server fns commonly throw a raw Response; String(it) is the
|
|
||||||
// opaque "[object Response]", so pull out the status and URL instead.
|
|
||||||
const message =
|
|
||||||
error instanceof Response
|
|
||||||
? `Response ${error.status}${error.url ? ` at ${error.url}` : ""}`
|
|
||||||
: error instanceof Error
|
|
||||||
? error.message
|
|
||||||
: String(error);
|
|
||||||
const stack = error instanceof Error ? error.stack : undefined;
|
|
||||||
window.__lovableReportRuntimeError?.({
|
|
||||||
message,
|
|
||||||
...(stack !== undefined && { stack }),
|
|
||||||
filename: window.location.pathname,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -12,7 +12,6 @@ import {
|
|||||||
import { useEffect, useState, type ReactNode } from "react";
|
import { useEffect, useState, type ReactNode } from "react";
|
||||||
|
|
||||||
import appCss from "../styles.css?url";
|
import appCss from "../styles.css?url";
|
||||||
import { reportLovableError } from "../lib/lovable-error-reporting";
|
|
||||||
import { BottomNav } from "../components/crapp/BottomNav";
|
import { BottomNav } from "../components/crapp/BottomNav";
|
||||||
import { CelebrazioneBadge } from "../components/crapp/CelebrazioneBadge";
|
import { CelebrazioneBadge } from "../components/crapp/CelebrazioneBadge";
|
||||||
import { Toaster } from "../components/ui/sonner";
|
import { Toaster } from "../components/ui/sonner";
|
||||||
@@ -47,9 +46,6 @@ function NotFoundComponent() {
|
|||||||
function ErrorComponent({ error, reset }: { error: Error; reset: () => void }) {
|
function ErrorComponent({ error, reset }: { error: Error; reset: () => void }) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
useEffect(() => {
|
|
||||||
reportLovableError(error, { boundary: "tanstack_root_error_component" });
|
|
||||||
}, [error]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex min-h-dvh items-center justify-center bg-background px-4">
|
<div className="flex min-h-dvh items-center justify-center bg-background px-4">
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
/**
|
|
||||||
* Check della segnalazione errori verso l'editor Lovable: `bun test/unit/lovable-error-reporting.test.ts`.
|
|
||||||
* Fuori dal browser (nessun `window`) deve essere un no-op silenzioso; qui simuliamo
|
|
||||||
* anche un `window` minimale per verificare cosa viene inoltrato al hook di reporting.
|
|
||||||
*/
|
|
||||||
import assert from "node:assert/strict";
|
|
||||||
import { reportLovableError } from "@/lib/lovable-error-reporting";
|
|
||||||
|
|
||||||
// --- fuori dal browser: nessun window, nessun crash ---------------------------
|
|
||||||
assert.equal(typeof window, "undefined", "il test gira in ambiente server, senza DOM");
|
|
||||||
assert.doesNotThrow(() => reportLovableError(new Error("boom")));
|
|
||||||
|
|
||||||
// --- con un window simulato: inoltra al hook dell'editor ----------------------
|
|
||||||
type Riportato = { message: string; stack?: string; filename?: string };
|
|
||||||
let riportato: Riportato | undefined;
|
|
||||||
const finto = {
|
|
||||||
location: { pathname: "/rosa" },
|
|
||||||
__lovableReportRuntimeError: (payload: Riportato) => {
|
|
||||||
riportato = payload;
|
|
||||||
},
|
|
||||||
} as unknown as Window & typeof globalThis;
|
|
||||||
|
|
||||||
(globalThis as { window?: unknown }).window = finto;
|
|
||||||
try {
|
|
||||||
reportLovableError(new Error("qualcosa è andato storto"));
|
|
||||||
assert.ok(riportato, "il payload è stato inoltrato");
|
|
||||||
assert.equal(riportato!.message, "qualcosa è andato storto");
|
|
||||||
assert.equal(riportato!.filename, "/rosa");
|
|
||||||
assert.ok(riportato!.stack, "include lo stack per un Error");
|
|
||||||
|
|
||||||
// Una Response non ha un messaggio leggibile: si usa status + url.
|
|
||||||
riportato = undefined;
|
|
||||||
reportLovableError(new Response(null, { status: 404 }));
|
|
||||||
assert.equal(riportato!.message, "Response 404");
|
|
||||||
assert.equal(riportato!.stack, undefined, "una Response non ha stack");
|
|
||||||
|
|
||||||
// Un valore qualunque diventa la sua stringa.
|
|
||||||
riportato = undefined;
|
|
||||||
reportLovableError("motivo generico");
|
|
||||||
assert.equal(riportato!.message, "motivo generico");
|
|
||||||
} finally {
|
|
||||||
delete (globalThis as { window?: unknown }).window;
|
|
||||||
}
|
|
||||||
|
|
||||||
assert.equal(typeof window, "undefined", "il window simulato non è rimasto in giro");
|
|
||||||
|
|
||||||
console.log("lovable-error-reporting: ok");
|
|
||||||
+87
-9
@@ -1,15 +1,93 @@
|
|||||||
// @lovable.dev/vite-tanstack-config already includes the following — do NOT add them manually
|
import { defineConfig, loadEnv, mergeConfig } from "vite";
|
||||||
// or the app will break with duplicate plugins:
|
import tailwindcss from "@tailwindcss/vite";
|
||||||
// - TanStack devtools (dev-only, first), tanstackStart, viteReact, tailwindcss, tsConfigPaths,
|
import tsConfigPaths from "vite-tsconfig-paths";
|
||||||
// nitro (build-only using cloudflare as a default target), VITE_* env injection, @ path alias,
|
import viteReact from "@vitejs/plugin-react";
|
||||||
// React/TanStack dedupe, error logger plugins, and sandbox detection (port/host/strictPort).
|
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
|
||||||
// You can pass additional config via defineConfig({ vite: { ... }, etc... }) if needed.
|
import { devtools } from "@tanstack/devtools-vite";
|
||||||
import { defineConfig } from "@lovable.dev/vite-tanstack-config";
|
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig(async ({ command, mode }) => {
|
||||||
tanstackStart: {
|
const isDevBuild = command === "build" && mode === "development";
|
||||||
|
|
||||||
|
const loadedEnv = loadEnv(mode, process.cwd(), "VITE_");
|
||||||
|
const envDefine: Record<string, string> = {};
|
||||||
|
for (const [key, value] of Object.entries(loadedEnv)) {
|
||||||
|
envDefine[`import.meta.env.${key}`] = JSON.stringify(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
const plugins = [];
|
||||||
|
if (mode === "development") {
|
||||||
|
plugins.push(
|
||||||
|
devtools({
|
||||||
|
logging: false,
|
||||||
|
eventBusConfig: { enabled: false },
|
||||||
|
enhancedLogs: { enabled: false },
|
||||||
|
consolePiping: { enabled: false },
|
||||||
|
removeDevtoolsOnBuild: false,
|
||||||
|
injectSource: { enabled: true },
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
plugins.push(tailwindcss());
|
||||||
|
plugins.push(tsConfigPaths({ projects: ["./tsconfig.json"] }));
|
||||||
|
plugins.push(
|
||||||
|
tanstackStart({
|
||||||
|
importProtection: {
|
||||||
|
behavior: "error",
|
||||||
|
client: { files: ["**/server/**"], specifiers: ["server-only"] },
|
||||||
|
},
|
||||||
// Redirect TanStack Start's bundled server entry to src/server.ts (our SSR error wrapper).
|
// Redirect TanStack Start's bundled server entry to src/server.ts (our SSR error wrapper).
|
||||||
// nitro/vite builds from this
|
// nitro/vite builds from this
|
||||||
server: { entry: "server" },
|
server: { entry: "server" },
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
if (command === "build") {
|
||||||
|
const { nitro } = await import("nitro/vite");
|
||||||
|
plugins.push(nitro({ defaultPreset: "cloudflare-module" }));
|
||||||
|
}
|
||||||
|
plugins.push(viteReact());
|
||||||
|
|
||||||
|
let config = {
|
||||||
|
define: envDefine,
|
||||||
|
...(isDevBuild
|
||||||
|
? {
|
||||||
|
environments: {
|
||||||
|
client: { define: { "process.env.NODE_ENV": JSON.stringify("development") } },
|
||||||
},
|
},
|
||||||
|
esbuild: { keepNames: true },
|
||||||
|
}
|
||||||
|
: {}),
|
||||||
|
css: { transformer: "lightningcss" as const },
|
||||||
|
resolve: {
|
||||||
|
alias: { "@": `${process.cwd()}/src` },
|
||||||
|
dedupe: [
|
||||||
|
"react",
|
||||||
|
"react-dom",
|
||||||
|
"react/jsx-runtime",
|
||||||
|
"react/jsx-dev-runtime",
|
||||||
|
"@tanstack/react-query",
|
||||||
|
"@tanstack/query-core",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
optimizeDeps: {
|
||||||
|
include: [
|
||||||
|
"react",
|
||||||
|
"react-dom",
|
||||||
|
"react-dom/client",
|
||||||
|
"react/jsx-runtime",
|
||||||
|
"react/jsx-dev-runtime",
|
||||||
|
],
|
||||||
|
ignoreOutdatedRequests: true,
|
||||||
|
},
|
||||||
|
plugins,
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mergeConfig(config, {
|
||||||
|
server: {
|
||||||
|
host: "::",
|
||||||
|
port: 8080,
|
||||||
|
watch: { awaitWriteFinish: { stabilityThreshold: 1000, pollInterval: 100 } },
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
return config;
|
||||||
});
|
});
|
||||||
Reference in new issue
Block a user