mirror of
https://github.com/Patiun/com.gregkilmer.www.git
synced 2026-11-08 04:08:24 +00:00
Images and content updates
This commit is contained in:
@@ -28,6 +28,27 @@ const SITE_URL = process.env.SITE_URL ?? 'https://gregkilmer.com';
|
||||
const PORT = Number(process.env.PORT ?? 4321);
|
||||
const HOST = process.env.HOST ?? '0.0.0.0';
|
||||
|
||||
/**
|
||||
* React-refresh preamble, injected into the layout <head> in dev (see
|
||||
* BaseLayout.astro). Returned as a string so the layout can emit it as an
|
||||
* inline module script that runs BEFORE any island module evaluates.
|
||||
*
|
||||
* Why this is needed: Vite 8 (Rolldown) + @vitejs/plugin-react 5.x does not
|
||||
* inject this preamble through Astro's SSR dev HTML pipeline, so the compiled
|
||||
* islands call $RefreshSig$() at module-eval time, throw, and never hydrate —
|
||||
* surfacing as "_jsxDEV is not a function" and leaving every React island
|
||||
* (carousel, mobile menu, contact/order forms, animated background) dead.
|
||||
*
|
||||
* Production builds are unaffected: the client bundle uses jsx/jsxs directly
|
||||
* and never touches $RefreshSig$. Remove this once @astrojs/react ships
|
||||
* plugin-react 6, which handles Rolldown natively.
|
||||
*/
|
||||
export const REACT_REFRESH_PREAMBLE =
|
||||
"import { injectIntoGlobalHook } from '/@react-refresh';\n" +
|
||||
'injectIntoGlobalHook(window);\n' +
|
||||
'window.$RefreshReg$ = () => {};\n' +
|
||||
'window.$RefreshSig$ = () => (type) => type;';
|
||||
|
||||
export default defineConfig({
|
||||
// Used for canonical URLs, sitemaps, and absolute metadata. Keep this in sync with the
|
||||
// deployed domain on your Cosmos reverse proxy.
|
||||
|
||||
Reference in New Issue
Block a user