0.13.8 • Published 10 days ago

@t3-oss/env-nuxt v0.13.8

Weekly downloads
-
License
MIT
Repository
github
Last release
10 days ago

Typesafe Envs made Simple

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

For full documentation, see https://env.t3.gg

Installation

# npm
npm i @t3-oss/env-nuxt

# pnpm
pnpm add @t3-oss/env-nuxt

# bun
bun add @t3-oss/env-nuxt

# deno
deno add jsr:@t3-oss/env-nuxt

Usage

!NOTE

You may use any Standard Schema compliant validator of your choice. This example uses Zod

// src/env.ts
import { createEnv } from "@t3-oss/env-nuxt";
import { z } from "zod";

export const env = createEnv({
  /*
   * Serverside Environment variables, not available on the client.
   * Will throw if you access these variables on the client.
   */
  server: {
    DATABASE_URL: z.string().url(),
    OPEN_AI_API_KEY: z.string().min(1),
  },
  /*
   * Environment variables available on the client (and server).
   *
   * 💡 You'll get type errors if these are not prefixed with NUXT_PUBLIC_.
   */
  client: {
    NUXT_PUBLIC_CLERK_PUBLISHABLE_KEY: z.string().min(1),
  },
});
0.13.6

24 days ago

0.13.7

10 days ago

0.13.8

10 days ago

0.12.0

5 months ago

0.13.0

2 months ago

0.13.1

2 months ago

0.13.2

2 months ago

0.13.3

2 months ago

0.13.4

2 months ago

0.13.5

24 days ago

0.11.0

11 months ago

0.11.1

10 months ago

0.10.1

1 year ago

0.10.0

1 year ago

0.9.0

1 year ago

0.9.2

1 year ago

0.9.1

1 year ago

0.8.0

1 year ago

0.7.2

1 year ago

0.7.3

1 year ago

0.7.1

2 years ago

0.7.0

2 years ago

0.6.1

2 years ago

0.5.0

2 years ago

0.6.0

2 years ago

0.5.1

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.1.0

2 years ago