diff --git a/packages/next/client/link.tsx b/packages/next/client/link.tsx index 80d34bc9b0dda1c..967a9cda6c2008d 100644 --- a/packages/next/client/link.tsx +++ b/packages/next/client/link.tsx @@ -522,6 +522,11 @@ const Link = React.forwardRef( // Prefetch the URL if we haven't already and it's visible. React.useEffect(() => { + // in dev, we only prefetch on hover to avoid wasting resources as the prefetch will trigger compiling the page. + if (process.env.NODE_ENV !== 'production') { + return + } + if (!router) { return }