Poprawki w konfiguracji
This commit is contained in:
@@ -6,68 +6,24 @@ import preact from "@astrojs/preact";
|
||||
export default defineConfig({
|
||||
site: "https://fuz.dariuszm.eu",
|
||||
output: 'server',
|
||||
|
||||
adapter: node({
|
||||
mode: "standalone"
|
||||
}),
|
||||
|
||||
server: {
|
||||
host: process.env.HOST || '0.0.0.0',
|
||||
port: parseInt(process.env.PORT || '4321'),
|
||||
},
|
||||
|
||||
// Build optimizations
|
||||
build: {
|
||||
inlineStylesheets: 'auto', // Inline małe CSS-y (<4KB)
|
||||
},
|
||||
|
||||
vite: {
|
||||
build: {
|
||||
minify: "esbuild", // Minifikacja JS
|
||||
cssMinify: true, // Minifikacja CSS (zmienione z "esbuild" na true)
|
||||
|
||||
// Rollup optimizations
|
||||
rollupOptions: {
|
||||
output: {
|
||||
// Lepsze nazwy plików z hashami
|
||||
assetFileNames: 'assets/[name].[hash][extname]',
|
||||
chunkFileNames: 'chunks/[name].[hash].js',
|
||||
entryFileNames: 'entry/[name].[hash].js',
|
||||
|
||||
// Code splitting - Preact w osobnym bundle
|
||||
manualChunks: (id) => {
|
||||
if (id.includes('node_modules')) {
|
||||
if (id.includes('preact')) {
|
||||
return 'vendor-preact';
|
||||
}
|
||||
if (id.includes('marked')) {
|
||||
return 'vendor-marked';
|
||||
}
|
||||
return 'vendor';
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// Chunk size warnings (opcjonalne)
|
||||
chunkSizeWarningLimit: 500, // KB
|
||||
minify: "esbuild",
|
||||
cssMinify: "esbuild",
|
||||
chunkSizeWarningLimit: 500,
|
||||
},
|
||||
|
||||
// CSS optimization dla Tailwind
|
||||
// css: {
|
||||
// transformer: 'lightningcss', // Szybszy CSS transformer npm install -D lightningcss
|
||||
// },
|
||||
},
|
||||
|
||||
// HTML compression
|
||||
compressHTML: true,
|
||||
|
||||
integrations: [
|
||||
preact({
|
||||
compat: true // Jeśli używasz React bibliotek
|
||||
}),
|
||||
preact(),
|
||||
tailwind({
|
||||
applyBaseStyles: true
|
||||
})
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "fuz20",
|
||||
"name": "fuz-site",
|
||||
"type": "module",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useMemo } from "preact/hooks";
|
||||
import { marked } from "marked";
|
||||
import { useLocalSearch } from "../../hooks/useLocalSearch.js";
|
||||
import { highlightText, highlightHtml } from "../../lib/highlightUtils.js";
|
||||
import { highlightText, highlightHtml } from "../../lib/highlightUtils.jsx";
|
||||
import "../../styles/jambox-search.css";
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user