fix: use nitro overlay to skip dev assets in production

This commit is contained in:
Daniel Roe 2022-12-08 11:50:44 +01:00
parent 8132efbc4d
commit 00b835444b
No known key found for this signature in database
GPG key ID: 22D5008E4F5D9B55
8 changed files with 20 additions and 13 deletions

View file

@ -3,7 +3,6 @@ import { APP_NAME, STORAGE_KEY_LANG } from '~/constants'
export function setupPageHeader() {
const isDev = process.dev
const isPreview = useRuntimeConfig().public.env === 'staging'
const suffix = isDev || isPreview ? '-dev' : ''
const i18n = useI18n()
@ -12,15 +11,6 @@ export function setupPageHeader() {
lang: () => i18n.locale.value,
},
titleTemplate: title => `${title ? `${title} | ` : ''}${APP_NAME}${isDev ? ' (dev)' : isPreview ? ' (preview)' : ''}`,
bodyAttrs: {
class: 'overflow-x-hidden',
},
link: [
{ rel: 'icon', type: 'image/svg+xml', href: `/favicon${suffix}.svg` },
{ rel: 'alternate icon', type: 'image/x-icon', href: `/favicon${suffix}.ico` },
{ rel: 'icon', type: 'image/png', href: `/favicon-16x16${suffix}.png`, sizes: '16x16' },
{ rel: 'icon', type: 'image/png', href: `/favicon-32x32${suffix}.png`, sizes: '32x32' },
],
})
// eslint-disable-next-line no-unused-expressions