UNPKG

@tanstack/solid-router

Version:

Modern and scalable routing for Solid applications

22 lines (21 loc) 728 B
let _tanstack_router_core_ssr_server = require("@tanstack/router-core/ssr/server"); //#region src/ssr/renderOptions.ts var pluginCache = /* @__PURE__ */ new WeakMap(); function getPlugin(adapter) { let plugin = pluginCache.get(adapter); if (!plugin) { plugin = (0, _tanstack_router_core_ssr_server.makeSsrSerovalPlugin)(adapter); pluginCache.set(adapter, plugin); } return plugin; } /** Solid renderer options shared by the stream and string paths. */ function getSolidRenderOptions(router) { return { nonce: router.options.ssr?.nonce, plugins: router.options.serializationAdapters?.map(getPlugin) }; } //#endregion exports.getSolidRenderOptions = getSolidRenderOptions; //# sourceMappingURL=renderOptions.cjs.map