Edit this page

Client runtime loaded twice

If you get this warning:

[vike][Warning] Client runtime loaded twice

Then this means that the page has loaded more than one copy of Vike's client runtime. In other words, the client-side bundle of the page includes Vike's client runtime twice (or more).

In order to reduce the size of your client, make sure that the client-side JavaScript of a given page includes Vike's client runtime only once.

You can inspect where Vike's client runtime is included twice:

cd dist/client/
grep -r 'loaded twice'
// vite.config.js
 
export default {
  // Temporarily disable minification to make it easier to inspect /dist/client
  build: { minify: false }
}