clientHooks

The clientHooks setting determines whether the page loads client hooks.

If false then no client hook is loaded on the client-side (saving KBs).

+client.js is always loaded, regardless of this setting. Set/override the value of the client setting to null if you also want to skip loading +client.js.

The usual use case is to control what code is loaded on the client-side for HTML-only pages, see Render Modes (SPA, SSR, SSG, HTML-only) > HTML-only.

By default, Vike sets its value to true (client-side hooks are loaded) if and only if:

Use this setting to override the default:

  • Set to false if you want the page to skip loading client hooks (saving KBs).
  • Set to true if you want to make sure the page loads client hooks.

See also