UNPKG

@t3-oss/env-nuxt

Version:

The Nuxt package comes preconfigured for Nuxt, and fills the runtimeEnv option automatically. All you need to do is define your schemas!

23 lines (21 loc) 528 B
import { createEnv as createEnv$1 } from "@t3-oss/env-core"; //#region src/index.ts const CLIENT_PREFIX = "NUXT_PUBLIC_"; /** * Create a new environment variable schema. */ function createEnv(opts) { const client = typeof opts.client === "object" ? opts.client : {}; const server = typeof opts.server === "object" ? opts.server : {}; const shared = opts.shared; return createEnv$1({ ...opts, shared, client, server, clientPrefix: CLIENT_PREFIX, runtimeEnv: process.env }); } //#endregion export { createEnv };