Ripristina card servizi e sistema typing plugin Vite
Made-with: Cursor
This commit is contained in:
@ -9,11 +9,16 @@ 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).
|
||||
*
|
||||
* @returns {import('vite').Plugin}
|
||||
*/
|
||||
function viteSsrOptimizeIgnoreOutdated() {
|
||||
return {
|
||||
name: 'vite-ssr-optimize-ignore-outdated',
|
||||
enforce: 'post',
|
||||
enforce: /** @type {'post'} */ ('post'),
|
||||
/**
|
||||
* @param {string} name
|
||||
*/
|
||||
configEnvironment(name) {
|
||||
if (name === 'astro' || name === 'ssr' || name === 'prerender') {
|
||||
return {
|
||||
@ -31,6 +36,8 @@ export default defineConfig({
|
||||
/** Usato da Astro per URL assoluti (es. sitemap). Imposta il dominio di produzione. */
|
||||
// site: 'https://www.tuodominio.com',
|
||||
|
||||
output: 'server', // per il deployment su Cloudflare Pages
|
||||
|
||||
vite: {
|
||||
plugins: [tailwindcss(), viteSsrOptimizeIgnoreOutdated()],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user