If your page isn't responsive, then we recommend setting the initial page width shown to the user:
// pages/admin-panel/+config.jsexport default { // The admin panel pages start to look good starting from a width of 1200px viewport: 1200}
If your page looks and works well only starting from 1200px then we recommend setting the value to 1200, so that the width shown to the user is 1200px (the virtual width), even on a mobile device with a real physical width of 600px: the browser will then zoom out the page by a factor of 2x in order to match 1200px.
The user will be able to manually change the viewport size with pinch gestures.
If viewport is a number, for example 1200, then Vike injects the following:
The viewport setting (and the <meta name="viewport"> tag in general) has an effect only on mobile/tablet devices: it's ignored on desktop devices.
You can also set any arbitrary <meta name="viewport"> tag:
// pages/+config.jsexport default { // Don't inject any `<meta name="viewport">` tag viewport: null}
// pages/+Head.js// Same as Vike's default but adding `user-scalable=no` which makes sense for// highly interactive apps such as games.export default () => <> <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" /></>
If there isn't any <meta name="viewport"> tag, then the browser will fallback to its default. We don't recommend this (it's unpredictable) and instead consider always setting a <meta name="viewport"> tag.