Skip to content

Conversation

@atharvadeosthale
Copy link
Member

@atharvadeosthale atharvadeosthale commented Nov 18, 2025

Summary by CodeRabbit

  • Documentation
    • Published a new blog article comparing Next.js output modes (default vs standalone). Includes observations and benchmarks, build size analysis, performance trade-offs, practical recommendations on when to use standalone or normal mode, guidance for choosing the right approach, and summary links for further reading.

@atharvadeosthale atharvadeosthale marked this pull request as draft November 18, 2025 23:21
@atharvadeosthale atharvadeosthale marked this pull request as ready for review November 18, 2025 23:21
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 18, 2025

Walkthrough

A new blog post page was added at src/routes/blog/post/nextjs-output-modes/+page.markdoc. The file contains front-matter metadata and a long-form article describing Next.js output modes (default vs standalone), including observations about bundling behavior, benchmarked build size and runtime comparisons, guidance on when to choose each mode, and reference links.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

  • Content verification: ensure the technical descriptions and benchmark numbers are accurate and up to date.
  • Formatting compliance: check Markdoc/front-matter syntax and consistency with other blog posts.
  • Link validation: confirm internal/external links resolve and use correct targets.

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'add next outputs blog' is vague and uses abbreviated terminology that lacks clarity about the actual content being added. Consider a more descriptive title such as 'Add blog post about Next.js output modes' to clearly convey the article's subject matter.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch next-outputs-blog

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 322fd48 and 89475f1.

📒 Files selected for processing (1)
  • src/routes/blog/post/nextjs-output-modes/+page.markdoc (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/routes/blog/post/nextjs-output-modes/+page.markdoc

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/routes/blog/post/nextjs-output-modes/+page.markdoc (1)

37-68: Minor phrasing issue in benchmark commentary.

Line 68 has awkward wording: "Funnily same build size" should be revised for clarity and natural flow.

Apply this diff to improve readability:

-The result is clear: standalone mode wins as it's consistently shown lower build sizes. Funnily same build size because even though we install heavy dependencies, we aren't actually importing/using them at all in the apps, so these dependencies aren't even getting traced and bundled, which is ideal! Lower build sizes mean faster cold starts on your app.
+The result is clear: standalone mode wins with consistently lower build sizes. Interestingly, both standalone builds show the same size because even though we install heavy dependencies, we aren't actually importing them in the apps—so these dependencies don't get traced or bundled, which is ideal! Lower build sizes mean faster cold starts for your app.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a534d62 and 322fd48.

⛔ Files ignored due to path filters (1)
  • static/images/blog/nextjs-output-modes/cover.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • src/routes/blog/post/nextjs-output-modes/+page.markdoc (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-11-18T21:53:20.881Z
Learnt from: atharvadeosthale
Repo: appwrite/website PR: 2614
File: src/routes/docs/products/sites/one-click-deployment/+page.markdoc:74-122
Timestamp: 2025-11-18T21:53:20.881Z
Learning: Appwrite Sites one-click deployment supports the following framework presets: Analog (analog), Angular (angular), Next.js (nextjs), React (react), Nuxt (nuxt), Vue (vue), SvelteKit (sveltekit), Astro (astro), TanStack Start (tanstack-start), Remix (remix), Lynx (lynx), Flutter (flutter), React Native (react-native), Vite (vite), and Other (other).

Applied to files:

  • src/routes/blog/post/nextjs-output-modes/+page.markdoc
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: assets
  • GitHub Check: build
  • GitHub Check: tests
🔇 Additional comments (4)
src/routes/blog/post/nextjs-output-modes/+page.markdoc (4)

13-35: Clear and engaging explanation of Next.js output modes.

The introduction and explanations of default vs standalone modes are well-structured and informative. The progression from concept → comparison → observations → recommendations follows good article flow.


70-78: Practical and balanced recommendations.

The section appropriately acknowledges trade-offs, providing realistic guidance (try standalone, fall back if issues arise) rather than absolute recommendations. The edge cases mentioned (monorepos, dynamic imports) are reasonable cautions.


1-11: Front matter structure and all assets verified.

Cover image asset and both linked blog posts confirmed to exist in the repository. The blog post is ready for publication.


80-85: Linked blog posts verified and ready.

Both referenced blog posts exist in the repository with substantive content:

  • src/routes/blog/post/nextjs-standalone-support-in-appwrite-sites/+page.markdoc (1,871 bytes)
  • src/routes/blog/post/everything-new-in-nextjs16/+page.markdoc (7,143 bytes)

The URL paths in the wrap-up section match the directory structure correctly. No action needed.

@atharvadeosthale atharvadeosthale marked this pull request as draft November 18, 2025 23:26
@tessamero
Copy link
Contributor

Two things - it's not really a tutorial so does it make sense to update the category?

Also, can we use a different word than "funnily" as it throws off the content

@tessamero tessamero marked this pull request as ready for review November 19, 2025 00:29
@@ -0,0 +1,85 @@
---
layout: post
title: Next.js output modes — Standalone vs Normal build
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets double check what they call the "normal build", worried it might not be accurate term. if we cant find any, "default" might be better.

Next.js is a very popular React framework. People choose it because it blends in with the server very well, using both client-side and server-side capabilities to provide a better user experience. Next.js is packed with cutting-edge React features like RSC. However, such complexity also brings complexity in deploying your app.

Appwrite Sites enables you to deploy your Next.js app seamlessly without any hassle of configuration. Appwrite handles all the complexity involved in deploying such complex apps, so that you can focus on the core logic of your app.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just read complex 4 times. I think thats too much

This results in bigger `.next` folder, but we also have to factor in the fact that `node_modules` are essential for the default mode, and not the standalone mode.

However, there's a very good reason for this mode not being the default yet.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also static mode (output: export). And in there a few configurations useful specifically or SPA too (like railing shash,

It's important to note that if you remove `node_modules`, which usually is the biggest chunk of your app, your app won't run anymore, as your builds also rely on `node_modules` to work properly. So, when counting the size of your app, you should also count in `node_modules` folder as well.

You might already think, shipping `node_modules` is a very big size hit, and it's true, but not always a bad thing. We will look at why later.

Copy link
Contributor

@Meldiron Meldiron Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another big part is "magic box" approach - nuxt start does something which you dont really understand. and you can configure some stuff, like port, but you cannot configure others, like custom middleware or global error handling.

You can do those things directly in next.js, but still, some setups, like appwite/website, benefits from ability to inject some scripts into HTTP listener itself.

Comment on lines +31 to +33
When building your app in standalone mode, Next.js traces all the files that are required by your app from your `node_modules`. This means that only the functionality your app uses will be bundled into your Next.js build. In this case, you can exclude `node_modules` when calculating sizes, as the build doesn't rely on `node_modules` as it already bundles all necessary code.

This results in bigger `.next` folder, but we also have to factor in the fact that `node_modules` are essential for the default mode, and not the standalone mode.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I remember, you dont need to ship entire .next folder, you only need .nex/standalone.

And there is downside - this doesnt bundle static assets, as they recommend to deploy them on CDN or S3 instead.
So for minimal setup, you need a few extra commands to copy static assets into this standalone directory.

Standalone mode: +0 KB (0.0% increase)
```

The result is clear: standalone mode wins as it's consistently shown lower build sizes. Funnily same build size because even though we install heavy dependencies, we aren't actually importing/using them at all in the apps, so these dependencies aren't even getting traced and bundled, which is ideal! Lower build sizes mean faster cold starts on your app.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would avoid term funily

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong image


```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 Summary & Comparisons
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets also below memtion benefit of smaller build. Faster cold-starts, less storage cost, faster bundling and distribution...

And I think faster builds too, but let's benchmark that first

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When benchamrking buiilds, let'ß benchmark both cached (with .next from previosu build), and uncached


```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 Summary & Comparisons
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When benchamrking buiilds, let'ß benchmark both cached (with .next from previosu build), and uncached

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants