Productserver-only包
server-only
An official npm package from Next.js. If it is imported into a client component ('use client'), the build fails immediately. It is used to prevent sensitive server code from leaking into the browser at compile time.
Timeline (last 90 days)
Oct 14
Next.js's official server-only npm package causes the build to fail outright when imported by a client component ('use client'), and is used to prevent sensitive server code from leaking to the browser at compile time.
Unverified50%