@intlayer/config
Version:
Retrieve Intlayer configurations and manage environment variables for both server-side and client-side environments.
20 lines • 717 B
JavaScript
import { getPlatform } from "../detectPlatform.mjs";
import { extractNextEnvVariable } from "./next.mjs";
import { extractReactAppEnvVariable } from "./react_app.mjs";
import { extractEmptyEnvVariable } from "./undefined_platform.mjs";
import { extractViteEnvVariable } from "./vite.mjs";
const extractEnvVariable = (options) => {
const platform = options?.platform ?? getPlatform();
if (platform === "vite") {
return extractViteEnvVariable();
} else if (platform === "next") {
return extractNextEnvVariable();
} else if (platform === "react_app") {
return extractReactAppEnvVariable();
}
return extractEmptyEnvVariable();
};
export {
extractEnvVariable
};
//# sourceMappingURL=index.mjs.map