Initial commit: sito NexStudio (Astro) con Cloudflare, CMS cookie e contenuti legali
- Home: hero, prodotti, servizi, stack, FAQ, CTA con form contatti inline (glossy) e particelle - Header nero, menu con scroll-spy e alone su voce attiva, CTA Chattiamo (pre-chat) - Pagine: privacy, cookie, GDPR, terms, about, codice etico, modello organizzativo, dove siamo, news - Cookie consent first-party, chat gate, stampe-friendly su SubpageLayout - Footer: Sezioni con Contattaci, Azienda con Dove siamo senza link per ora - .gitignore: aggiunto .wrangler/ per stato locale Cloudflare Made-with: Cursor
This commit is contained in:
40
astro.config.mjs
Normal file
40
astro.config.mjs
Normal file
@ -0,0 +1,40 @@
|
||||
// @ts-check
|
||||
import { defineConfig } from 'astro/config';
|
||||
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
import cloudflare from '@astrojs/cloudflare';
|
||||
import alpinejs from '@astrojs/alpinejs';
|
||||
|
||||
/**
|
||||
* Mitiga race su richieste SSR parallele durante l’ottimizzazione dipendenze
|
||||
* (Astro + Cloudflare + Vite 7: file mancanti sotto `node_modules/.vite/deps_*`).
|
||||
* Se l’errore persiste: `npm run dev:fresh` (cancella la cache Vite e riavvia).
|
||||
*/
|
||||
function viteSsrOptimizeIgnoreOutdated() {
|
||||
return {
|
||||
name: 'vite-ssr-optimize-ignore-outdated',
|
||||
enforce: 'post',
|
||||
configEnvironment(name) {
|
||||
if (name === 'astro' || name === 'ssr' || name === 'prerender') {
|
||||
return {
|
||||
optimizeDeps: {
|
||||
ignoreOutdatedRequests: true,
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
/** Usato da Astro per URL assoluti (es. sitemap). Imposta il dominio di produzione. */
|
||||
// site: 'https://www.tuodominio.com',
|
||||
|
||||
vite: {
|
||||
plugins: [tailwindcss(), viteSsrOptimizeIgnoreOutdated()],
|
||||
},
|
||||
|
||||
adapter: cloudflare(),
|
||||
integrations: [alpinejs()],
|
||||
});
|
||||
Reference in New Issue
Block a user