refactor: finalize type-safe env and config using @mintel/next-utils 1.7.8
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* Centralized configuration management for the application.
|
||||
* This file provides a type-safe way to access environment variables.
|
||||
*/
|
||||
import { envSchema, getRawEnv } from './env';
|
||||
import { env, getRawEnv } from './env';
|
||||
|
||||
let memoizedConfig: ReturnType<typeof createConfig> | undefined;
|
||||
|
||||
@@ -11,7 +11,7 @@ let memoizedConfig: ReturnType<typeof createConfig> | undefined;
|
||||
* Throws if validation fails.
|
||||
*/
|
||||
function createConfig() {
|
||||
const env = envSchema.parse(getRawEnv()) as any;
|
||||
const env = getRawEnv();
|
||||
|
||||
const target = env.NEXT_PUBLIC_TARGET || env.TARGET;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user