exhibitionist-digital / ultra

Zero-Legacy Deno/React Suspense SSR Framework

Home Page:https://ultrajs.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

https://ultrajs.dev on Safari is broken

richardPFisk opened this issue · comments

image

image

image

I have been enjoying UltraJS, thanks for creating it. I noticed on my website and on the UltraJS website, that there are errors (see the image above).
I haven't found the root cause yet, and I'll share my findings if I make progress.
It appears that es-module-shims has a problem.

Closing it as the code below works:

await createServer({
  importMapPath: import.meta.resolve("./importMap.json"),
  browserEntrypoint: import.meta.resolve("./client.tsx"),
  enableEsModuleShims: true,
  esModuleShimsPath:
    "https://ga.jspm.io/npm:es-module-shims@1.7.0/dist/es-module-shims.js",
});

Setting enableEsModuleShims as true for Safari:
await server.render(<ServerApp context={context} />, { enableEsModuleShims: true })

Using un-configured render for Chrome:
await server.render(<ServerApp context={context} />)

Note: the error TypeError: Module specifier, 'react/jsx-runtime' does not start with "/", "./", or "../". Referenced from still occurs but the client code runs.