Skip to content

Commit

Permalink
Add version disclaimer to jiti docs (#298)
Browse files Browse the repository at this point in the history
Co-authored-by: Julius Marminge <[email protected]>
  • Loading branch information
JulianKingman and juliusmarminge authored Jan 25, 2025
1 parent e7e2109 commit 5f1c9c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/src/app/docs/nextjs/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ import { fileURLToPath } from "node:url";
import createJiti from "jiti";
const jiti = createJiti(fileURLToPath(import.meta.url));

// Import env here to validate during build. Using jiti we can import .ts files :)
// Import env here to validate during build. Using jiti@^1 we can import .ts files :)
jiti("./app/env");

/** @type {import('next').NextConfig} */
Expand All @@ -123,6 +123,8 @@ export default {
};
```
We do not recommend using `next.config.ts` as it does not support loading ESM.
### Use your schema
Then, import the `env` object in your application and use it, taking advantage of type-safety and auto-completion:
Expand Down

0 comments on commit 5f1c9c5

Please sign in to comment.