UNPKG

one

Version:

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

20 lines (19 loc) 623 B
import { setCacheKey } from "../constants.mjs"; function setupBuildInfo(buildInfo) { const key = buildInfo.constants?.CACHE_KEY; if (key) { process.env.ONE_CACHE_KEY ||= key; setCacheKey(key); } process.env.ONE_DEFAULT_RENDER_MODE ||= buildInfo.oneOptions?.web?.defaultRenderMode || "ssg"; const { cssContentsByPath } = buildInfo; if (cssContentsByPath) { for (const route of Object.values(buildInfo.routeToBuildInfo)) { route.cssContents = route.css.map(cssPath => cssContentsByPath[cssPath] ?? ""); } } } export { setupBuildInfo }; //# sourceMappingURL=setupBuildOptions.mjs.map