PC-mj/.output/server/chunks/app/_nuxt/island-renderer-1d37df94.mjs
2024-01-03 19:11:30 +08:00

44 lines
1.1 KiB
JavaScript

import { defineComponent, onErrorCaptured, createVNode } from 'vue';
import { c as createError } from '../server.mjs';
import '../../nitro/node-server.mjs';
import 'node:http';
import 'node:https';
import 'fs';
import 'path';
import 'node:fs';
import 'node:url';
import 'unhead';
import '@unhead/shared';
import 'vue-router';
import 'vue/server-renderer';
const components_islands = {};
const islandComponents = /* @__PURE__ */ Object.freeze({
__proto__: null,
default: components_islands
});
const islandRenderer = defineComponent({
props: {
context: {
type: Object,
required: true
}
},
setup(props) {
const component = islandComponents[props.context.name];
if (!component) {
throw createError({
statusCode: 404,
statusMessage: `Island component not found: ${props.context.name}`
});
}
onErrorCaptured((e) => {
console.log(e);
});
return () => createVNode(component || "span", { ...props.context.props, "nuxt-ssr-component-uid": "" });
}
});
export { islandRenderer as default };
//# sourceMappingURL=island-renderer-1d37df94.mjs.map