41 lines
801 B
JavaScript
41 lines
801 B
JavaScript
// @ts-check
|
|
import { defineConfig } from 'astro/config';
|
|
import preact from '@astrojs/preact';
|
|
|
|
// https://astro.build/config
|
|
export default defineConfig({
|
|
integrations: [
|
|
preact({
|
|
compat: true, // Enable React compatibility for better ecosystem support
|
|
})
|
|
],
|
|
|
|
// Build optimizations
|
|
build: {
|
|
inlineStylesheets: 'auto',
|
|
},
|
|
|
|
// Vite configuration for development
|
|
vite: {
|
|
define: {
|
|
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
|
|
},
|
|
css: {
|
|
modules: {
|
|
localsConvention: 'camelCase',
|
|
},
|
|
},
|
|
optimizeDeps: {
|
|
include: ['preact/hooks'],
|
|
},
|
|
},
|
|
|
|
// Development server configuration
|
|
server: {
|
|
port: 3000,
|
|
host: true,
|
|
},
|
|
|
|
// Performance and SEO optimizations
|
|
compressHTML: true,
|
|
}); |