refactor: rename build & preview scripts to separate SSR and SSG#29
Merged
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughBuild and preview scripts were split into explicit SSG and SSR variants; CI/workflow and Nuxt config were updated to use and detect the new script names and lifecycle events. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@nuxt.config.ts`:
- Around line 168-172: The current guard uses process.argv to set
isBuildOrGenerate which misses Nuxt subprocess CLI names and skips legal env
validation during real builds; update the detection to use
process.env.npm_lifecycle_event (checking for 'build:ssr' or 'build:ssg') or
alternatively detect Nuxt subcommands directly (e.g., look for 'build' or
'generate' in process.argv) so the guard around the NUXT_PUBLIC_LEGAL_*
validation runs during actual production builds; modify the isBuildOrGenerate
assignment accordingly and keep the existing early return behavior.
In `@package.json`:
- Line 57: The "preview:ssg" npm script currently calls "npx serve
.output/public", which bypasses pnpm and the lockfile; change the script named
"preview:ssg" in package.json to invoke the pinned binary via pnpm (e.g., "pnpm
exec serve .output/public") and add "serve" as a devDependency (with a specific
version) in package.json so the preview uses the repo's locked dependency set
and remains reproducible.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 4998c820-4bb1-4b2d-bea7-43015ee88e50
📒 Files selected for processing (4)
.coderabbit.yml.github/workflows/build-deploy.ymlnuxt.config.tspackage.json
This was referenced May 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors the
package.jsonscripts to provide a clearer distinction between Static Site Generation (SSG) and Server-Side Rendering (SSR) build processes.Summary by CodeRabbit
Chores
Documentation