UNPKG

@shopify/react-server

Version:
20 lines (17 loc) 605 B
import { noSourceExists, Entrypoint, HEADER } from '../shared.mjs'; function errorSSRComponentExists(options, compiler) { return !noSourceExists(Entrypoint.Error, options, compiler); } function errorClientSource() { return ` ${HEADER} import React from 'react'; import ReactDOM from 'react-dom/client'; import {showPage} from '@shopify/react-html'; import Error from 'error'; const appContainer = document.getElementById('app'); ReactDOM.hydrateRoot(appContainer, React.createElement(Error)); showPage(); `; } export { errorClientSource, errorSSRComponentExists };