UNPKG

one

Version:

One is a new React Framework that makes Vite serve both native and web.

29 lines (28 loc) 927 B
import { getRoutes } from "../router/getRoutes.native.js"; import { getServerManifest } from "./getServerManifest.native.js"; function createMockModuleWithContext() { var map = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], contextModule = function (key) { return { default() {} }; }; return Object.defineProperty(contextModule, "keys", { value: function () { return map; } }), contextModule; } function createRoutesManifest(paths, options) { var routeTree = getRoutes(createMockModuleWithContext(paths), { ...options, preserveApiRoutes: !0, ignoreRequireErrors: !0, ignoreEntryPoints: !0, platform: "web" }); if (!routeTree) throw new Error(`No route tree found in paths: ${JSON.stringify(paths)}`); return getServerManifest(routeTree); } export { createRoutesManifest }; //# sourceMappingURL=createRoutesManifest.native.js.map