Closed richardPFisk closed 1 year ago
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.
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.