site/node_modules/preact/compat/server.js

27 lines
712 B
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
/* eslint-disable */
var renderToString;
try {
const mod = require('preact-render-to-string');
renderToString = mod.default || mod.renderToString || mod;
} catch (e) {
throw Error(
'renderToString() error: missing "preact-render-to-string" dependency.'
);
}
var renderToPipeableStream;
try {
const mod = require('preact-render-to-string/stream-node');
renderToPipeableStream = mod.default || mod.renderToPipeableStream || mod;
} catch (e) {
throw Error(
'renderToPipeableStream() error: update "preact-render-to-string" dependency to at least 6.5.0.'
);
}
module.exports = {
renderToString: renderToString,
renderToStaticMarkup: renderToString,
renderToPipeableStream: renderToPipeableStream
};