fix: use nitro overlay to skip dev assets in production
This commit is contained in:
parent
8132efbc4d
commit
00b835444b
8 changed files with 20 additions and 13 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue