Skip to content

Commit

Permalink
Update packages/next/client/link.tsx
Browse files Browse the repository at this point in the history
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
  • Loading branch information
feedthejim and timneutkens committed Dec 5, 2022
1 parent c432a8b commit 2d52f18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/client/link.tsx
Expand Up @@ -522,7 +522,7 @@ const Link = React.forwardRef<HTMLAnchorElement, LinkPropsReal>(

// 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
// 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
}
Expand Down

0 comments on commit 2d52f18

Please sign in to comment.