fix: disable `nuxt-security` in dev

zio/stable
Anthony Fu 2023-01-17 11:51:32 +01:00
parent 21b277ffce
commit 3050350f25
1 changed files with 3 additions and 1 deletions

View File

@ -25,7 +25,7 @@ export default defineNuxtConfig({
'@vue-macros/nuxt', '@vue-macros/nuxt',
'@nuxtjs/i18n', '@nuxtjs/i18n',
'@nuxtjs/color-mode', '@nuxtjs/color-mode',
...!isDevelopment || !isWindows ? ['nuxt-security'] : [], ...(isDevelopment || isWindows) ? [] : ['nuxt-security'],
'~/modules/purge-comments', '~/modules/purge-comments',
'~/modules/setup-components', '~/modules/setup-components',
'~/modules/build-env', '~/modules/build-env',
@ -146,6 +146,8 @@ export default defineNuxtConfig({
], ],
}, },
}, },
// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error
// @ts-ignore nuxt-security is conditional
security: { security: {
headers: { headers: {
crossOriginEmbedderPolicy: false, crossOriginEmbedderPolicy: false,