test: add typeCheck test in minimal build (#28166)

This commit is contained in:
Daniel Roe 2024-07-16 11:08:21 +01:00
parent d10cea11be
commit a051035881
No known key found for this signature in database
GPG Key ID: CBC814C393D93268

View File

@ -1,10 +1,17 @@
import { readFileSync } from 'node:fs'
import { fileURLToPath } from 'node:url'
const testWithInlineVue = process.env.EXTERNAL_VUE === 'false'
const nuxtEntry = fileURLToPath(new URL('../../../packages/nuxt/dist/index.mjs', import.meta.url))
const isStubbed = readFileSync(nuxtEntry, 'utf-8').includes('const _module = jiti')
export default defineNuxtConfig({
future: { compatibilityVersion: process.env.TEST_V4 === 'true' ? 4 : 3 },
compatibilityDate: '2024-06-28',
typescript: {
typeCheck: isStubbed ? false : 'build',
},
pages: false,
experimental: {
externalVue: !testWithInlineVue,