fix: disable nuxt-security in dev

This commit is contained in:
Anthony Fu 2023-01-17 11:51:32 +01:00
parent 21b277ffce
commit 3050350f25

View file

@ -25,7 +25,7 @@ export default defineNuxtConfig({
'@vue-macros/nuxt',
'@nuxtjs/i18n',
'@nuxtjs/color-mode',
...!isDevelopment || !isWindows ? ['nuxt-security'] : [],
...(isDevelopment || isWindows) ? [] : ['nuxt-security'],
'~/modules/purge-comments',
'~/modules/setup-components',
'~/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: {
headers: {
crossOriginEmbedderPolicy: false,