Skip to content

Commit 72c734a

Browse files
committed
test
1 parent bd79571 commit 72c734a

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ 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"
76

87
/**
98
* Load content-collections outputs
@@ -13,9 +12,8 @@ import { getServerEnv } from "~/env.server"
1312
*/
1413
export async function loadContentCollections(version: Version) {
1514
const projectRoot = process.cwd()
16-
const isDev = getServerEnv().APP_ENV === "development"
1715
// locally we use the actual content-collections source for DX and hot-reloads
18-
if (isDev) {
16+
if (process.env.NODE_ENV === "development") {
1917
const { allPages, allSections } = await import("content-collections")
2018
return { allPages, allSections }
2119
}

docs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"execute": "tsx",
1111
"clean": "git clean -fdX --exclude=\"!.env\"",
1212
"script": "tsx scripts/setup.ts",
13-
"build": "react-router build",
13+
"build": "pnpm run content-collections:build && react-router build",
1414
"predev": "run-s typegen verify:docs",
1515
"dev": "react-router dev",
1616
"start": "NODE_ENV=production node ./build/server/index.js",
@@ -102,4 +102,4 @@
102102
"node": ">=22.17.0",
103103
"pnpm": ">=10.18.0"
104104
}
105-
}
105+
}

0 commit comments

Comments
 (0)