Proposal: Integrate server-only as a first-class utility in next core #91180
-
GoalsZero-Config Security: Eliminate the requirement to manually install server-only as a separate peer dependency for every project. Improved Discoverability: Make server-side enforcement part of the standard next API (e.g., next/server-only), making it easier for new developers to find. Package Consistency: Reduce the "fragmentation" of having to manage a tiny, single-purpose external package for a core Next.js architectural concept. Non-GoalsNo response BackgroundCurrently, the While the documentation recommends it, it currently exists as a separate dependency that developers must remember to npm install. ProposalI propose that Next.js should export a built-in |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
It is already automatically interpreted by the framework. Next.js does some additional checks to make sure you get better errors when a module ends up in the wrong module graph. |
Beta Was this translation helpful? Give feedback.
It is already automatically interpreted by the framework. Next.js does some additional checks to make sure you get better errors when a module ends up in the wrong module graph.