UNPKG

@shopify/react-server

Version:
25 lines (20 loc) 726 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var shared = require('../shared.js'); function errorSSRComponentExists(options, compiler) { return !shared.noSourceExists(shared.Entrypoint.Error, options, compiler); } function errorClientSource() { return ` ${shared.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(); `; } exports.errorClientSource = errorClientSource; exports.errorSSRComponentExists = errorSSRComponentExists;