refactor: load env files with @next/env instead of dotenv

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
jakeandClaude Sonnet 5.5 committed 2026-10-03 09:32:06 -04:00
1 parent b5f0b01998
commit 373f1cfc75
4 files changed
+10 -13

No files matched your search

+3 -1
View File
@@ -1,5 +1,5 @@
import "dotenv/config";
import { defineCollection, defineConfig } from "@content-collections/core";
import nextEnv from "@next/env";
import { decode } from "html-entities";
import { unified } from "unified";
import { z } from "zod";
@@ -14,6 +14,8 @@ import {
remarkStripMdxImportsExports,
} from "@/lib/remark";
nextEnv.loadEnvConfig(process.cwd());
const POSTS_DIR = "notes" as const;
const parseableDate = z.string().refine((value) => !Number.isNaN(Date.parse(value)), {
+3 -1
View File
@@ -1,6 +1,8 @@
import "dotenv/config";
import nextEnv from "@next/env";
import { defineConfig } from "drizzle-kit";
nextEnv.loadEnvConfig(process.cwd());
export default defineConfig({
schema: "./lib/db/schema.ts",
out: "./drizzle",
+1 -1
View File
@@ -80,6 +80,7 @@
"@content-collections/cli": "^0.1.9",
"@content-collections/core": "^0.15.3",
"@content-collections/next": "^0.2.11",
"@next/env": "16.3.8",
"@tailwindcss/postcss": "^4.3.3",
"@tailwindcss/typography": "^0.5.20",
"@types/mdx": "^2.0.14",
@@ -88,7 +89,6 @@
"@types/react": "19.3.0",
"@types/react-dom": "19.3.0",
"babel-plugin-react-compiler": "1.0.0",
"dotenv": "^18.0.5",
"drizzle-kit": "1.0.0-rc.5-5935859",
"oxfmt": "^0.71.0",
"oxlint": "^1.86.0",
+3 -10
View File
@@ -335,6 +335,9 @@ importers:
'@content-collections/next':
specifier: ^0.2.11
version: 0.2.11(@content-collections/core@0.15.3(typescript@7.0.2))(next@16.3.8(@babel/core@7.29.7)(@types/node@26.6.4)(babel-plugin-react-compiler@1.0.0)(react-dom@19.3.0(react@19.3.0))(react@19.3.0))
'@next/env':
specifier: 16.3.8
version: 16.3.8
'@tailwindcss/postcss':
specifier: ^4.3.3
version: 4.3.3
@@ -359,9 +362,6 @@ importers:
babel-plugin-react-compiler:
specifier: 1.0.0
version: 1.0.0
dotenv:
specifier: ^18.0.5
version: 18.0.5
drizzle-kit:
specifier: 1.0.0-rc.5-5935859
version: 1.0.0-rc.5-5935859
@@ -2311,11 +2311,6 @@ packages:
resolution: {integrity: sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==}
engines: {node: '>=12'}
dotenv@18.0.5:
resolution: {integrity: sha512-aBrGvt6KhjxbEnatqMWOMidftwsrCiCvqh1yNIGB9QyF0J+VcWkKDMsvYOEm7ZS82oiV+BT1sTOtIlAmUlTpwQ==}
engines: {node: '>=12'}
hasBin: true
drizzle-kit@1.0.0-rc.5-5935859:
resolution: {integrity: sha512-p//MvJbSeDFxa3pODv0ebNVJmk/5aAHHaCyQTtDGFlCYX4e7eY9rrSX/liBJ7098Ei9WUi9VT65JQkSFDuG1ng==}
hasBin: true
@@ -5852,8 +5847,6 @@ snapshots:
dotenv@17.4.2: {}
dotenv@18.0.5: {}
drizzle-kit@1.0.0-rc.5-5935859:
dependencies:
'@drizzle-team/brocli': 0.12.1