-
Notifications
You must be signed in to change notification settings - Fork 0
fix(devvit.json): pass devvit upload schema validation + entry resolution
#20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,8 +1,11 @@ | ||||||||||||||||||||||
| // vite.config.ts — builds the Devvit Web *server* bundle. | ||||||||||||||||||||||
| // vibe-mod is server-only (no webview/post), so there's just one build target: | ||||||||||||||||||||||
| // the Node server endpoints in src/server/index.ts, compiled to a single | ||||||||||||||||||||||
| // CommonJS file at dist/server/index.cjs (the path `devvit.json`'s `server.entry` | ||||||||||||||||||||||
| // points at). The Devvit Web runtime requires CJS — ESM server output is not | ||||||||||||||||||||||
| // CommonJS file at dist/server/index.cjs. devvit.json declares this as | ||||||||||||||||||||||
| // `server: { dir: "dist/server", entry: "index.cjs" }` — `entry` is the filename | ||||||||||||||||||||||
| // *within* `dir`, not a path from the project root, so it must stay in sync with | ||||||||||||||||||||||
| // `outDir` + `entryFileNames` below. The Devvit Web runtime requires CJS — ESM | ||||||||||||||||||||||
| // server output is not | ||||||||||||||||||||||
|
Comment on lines
+4
to
+8
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line 8의 불완전한 문장 주석 Line 8이 "The Devvit Web runtime requires CJS — ESM server output is not"로 끝나면서 문장이 중간에 끊긴 것처럼 보입니다. "is not supported" 같은 식으로 완성되어야 할 것 같습니다. 📝 제안된 수정-// server output is not
+// server output is not supported.📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
| // supported. Run via `vite build` (= devvit.json `scripts.build`, used by | ||||||||||||||||||||||
| // `devvit upload`) or `vite build --watch` (= `scripts.dev`, used by `devvit playtest`). | ||||||||||||||||||||||
| // | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
What is the default value for server.dir in Devvit config schema when not specified?💡 Result:
There is no
server.dirproperty in the Devvit config schema (devvit.json). Theserverobject only has anentryproperty, which specifies the server bundle filename and has a default value of "src/server/index.js" [1][2][3]. Thedirproperty is used in thepostobject for web view configuration (e.g., "public" or "dist/client"), but not underserver[1][4].Citations:
🏁 Script executed:
Repository: Two-Weeks-Team/vibe-mod
Length of output: 596
에러 메시지의 부정확한 정보 수정 필요
에러 메시지가 존재하지 않는
server.dir속성을 언급하고 있습니다. Devvit 공식 문서에 따르면server객체에는dir속성이 없으며,server.entry의 기본값은dist/server가 아니라src/server/index.js입니다. "within server.dir (default dist/server)" 부분을 삭제하고 더 정확한 메시지로 수정하세요.🤖 Prompt for AI Agents