20 lines
553 B
TypeScript
20 lines
553 B
TypeScript
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
import path from "path";
|
|
|
|
const environment = process.env.NODE_ENV || "development";
|
|
const isProduction = environment === "production";
|
|
const isDevelopment = environment === "development";
|
|
|
|
// Determina la extensión de archivo según el entorno
|
|
const extension = isProduction ? ".js" : ".ts";
|
|
|
|
const environmentConfig = require(path.resolve(__dirname, "environments", environment + extension));
|
|
|
|
export const config = {
|
|
environment,
|
|
isProduction,
|
|
isDevelopment,
|
|
|
|
...environmentConfig,
|
|
};
|