Refactor BSC Score to Astro, TypeScript, and modular architecture
This commit is contained in:
@@ -1,9 +1,41 @@
|
||||
// @ts-check
|
||||
import { defineConfig } from 'astro/config';
|
||||
|
||||
import preact from '@astrojs/preact';
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
integrations: [preact()]
|
||||
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,
|
||||
});
|
||||
Reference in New Issue
Block a user