Skip to content

Commit bd79571

Browse files
committed
test
1 parent 68295fd commit bd79571

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/app/utils/load-content-collections.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { pathToFileURL } from "node:url"
33
import type { Page } from "content-collections-types"
44
import type { Section } from "content-collections-types"
55
import type { Version } from "./version-resolvers"
6+
import { getServerEnv } from "~/env.server"
67

78
/**
89
* Load content-collections outputs
@@ -12,8 +13,9 @@ import type { Version } from "./version-resolvers"
1213
*/
1314
export async function loadContentCollections(version: Version) {
1415
const projectRoot = process.cwd()
16+
const isDev = getServerEnv().APP_ENV === "development"
1517
// locally we use the actual content-collections source for DX and hot-reloads
16-
if (process.env.NODE_ENV === "development") {
18+
if (isDev) {
1719
const { allPages, allSections } = await import("content-collections")
1820
return { allPages, allSections }
1921
}

0 commit comments

Comments
 (0)