Fix Docker build by splitting client-safe gua utils from fs-based content loader.

Client components were importing zhouyi.ts which pulled in fs/promises; move pure helpers to gua-utils.ts and mark zhouyi.ts server-only.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-10 21:38:38 +08:00
parent a487b17165
commit 698a20a1d4
7 changed files with 81 additions and 61 deletions
+7
View File
@@ -22,6 +22,7 @@
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-markdown": "^9.0.3",
"server-only": "^0.0.1",
"tailwind-merge": "^2.6.0"
},
"devDependencies": {
@@ -7369,6 +7370,12 @@
"node": ">=10"
}
},
"node_modules/server-only": {
"version": "0.0.1",
"resolved": "https://registry.npmmirror.com/server-only/-/server-only-0.0.1.tgz",
"integrity": "sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==",
"license": "MIT"
},
"node_modules/set-function-length": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",