UNPKG

@intlayer/config

Version:

Retrieve Intlayer configurations and manage environment variables for both server-side and client-side environments.

44 lines 1.87 kB
"use strict"; 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 extractEnvVariable_exports = {}; __export(extractEnvVariable_exports, { extractEnvVariable: () => extractEnvVariable }); module.exports = __toCommonJS(extractEnvVariable_exports); var import_detectPlatform = require('../detectPlatform.cjs'); var import_next = require('./next.cjs'); var import_react_app = require('./react_app.cjs'); var import_undefined_platform = require('./undefined_platform.cjs'); var import_vite = require('./vite.cjs'); const extractEnvVariable = (options) => { const platform = options?.platform ?? (0, import_detectPlatform.getPlatform)(); if (platform === "vite") { return (0, import_vite.extractViteEnvVariable)(); } else if (platform === "next") { return (0, import_next.extractNextEnvVariable)(); } else if (platform === "react_app") { return (0, import_react_app.extractReactAppEnvVariable)(); } return (0, import_undefined_platform.extractEmptyEnvVariable)(); }; // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { extractEnvVariable }); //# sourceMappingURL=index.cjs.map