diff --git a/astro.config.mjs b/astro.config.mjs index 4c94993..7ad4202 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -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 }) ] -}); \ No newline at end of file +}); diff --git a/package.json b/package.json index 1e78aff..1881b07 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { - "name": "fuz20", + "name": "fuz-site", + "type": "module", "version": "1.0.0", "private": true, "scripts": { diff --git a/src/islands/jambox/JamboxMozliwosciSearch.jsx b/src/islands/jambox/JamboxMozliwosciSearch.jsx index bb7c470..d2b2c0b 100644 --- a/src/islands/jambox/JamboxMozliwosciSearch.jsx +++ b/src/islands/jambox/JamboxMozliwosciSearch.jsx @@ -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"; /**