clientHooks

The clientHooks setting determines whether hooks should be loaded on the client-side.

If false then hooks aren't 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 to skip loading hooks on the client-side (saving KBs).
  • Set to true if you want to ensure hooks are loaded on the client-side.

See also