one
Version:
One is a new React Framework that makes Vite serve both native and web.
43 lines (41 loc) • 1.92 kB
JavaScript
;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all) __defProp(target, name, {
get: all[name],
enumerable: true
});
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
get: () => from[key],
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
});
}
return to;
};
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
value: true
}), mod);
var setupBuildOptions_exports = {};
__export(setupBuildOptions_exports, {
setupBuildInfo: () => setupBuildInfo
});
module.exports = __toCommonJS(setupBuildOptions_exports);
var import_constants = require("../constants.native.js");
function setupBuildInfo(buildInfo) {
var _process_env;
var _buildInfo_constants, _buildInfo_oneOptions_web, _buildInfo_oneOptions;
var key = (_buildInfo_constants = buildInfo.constants) === null || _buildInfo_constants === void 0 ? void 0 : _buildInfo_constants.CACHE_KEY;
if (key) {
var _process_env1;
(_process_env1 = process.env).ONE_CACHE_KEY || (_process_env1.ONE_CACHE_KEY = key);
(0, import_constants.setCacheKey)(key);
}
(_process_env = process.env).ONE_DEFAULT_RENDER_MODE || (_process_env.ONE_DEFAULT_RENDER_MODE = ((_buildInfo_oneOptions = buildInfo.oneOptions) === null || _buildInfo_oneOptions === void 0 ? void 0 : (_buildInfo_oneOptions_web = _buildInfo_oneOptions.web) === null || _buildInfo_oneOptions_web === void 0 ? void 0 : _buildInfo_oneOptions_web.defaultRenderMode) || "ssg");
}
//# sourceMappingURL=setupBuildOptions.native.js.map