2024-07-16 10:08:21 +00:00
|
|
|
import { readFileSync } from 'node:fs'
|
2023-06-28 13:49:50 +00:00
|
|
|
import { fileURLToPath } from 'node:url'
|
|
|
|
|
|
|
|
const testWithInlineVue = process.env.EXTERNAL_VUE === 'false'
|
|
|
|
|
2024-07-16 10:08:21 +00:00
|
|
|
const nuxtEntry = fileURLToPath(new URL('../../../packages/nuxt/dist/index.mjs', import.meta.url))
|
|
|
|
const isStubbed = readFileSync(nuxtEntry, 'utf-8').includes('const _module = jiti')
|
|
|
|
|
2023-03-16 07:34:22 +00:00
|
|
|
export default defineNuxtConfig({
|
2024-03-15 18:31:13 +00:00
|
|
|
$production: {
|
|
|
|
vite: {
|
|
|
|
$client: {
|
|
|
|
build: {
|
|
|
|
rollupOptions: {
|
|
|
|
output: {
|
|
|
|
chunkFileNames: '_nuxt/[name].js',
|
2024-04-05 18:08:32 +00:00
|
|
|
entryFileNames: '_nuxt/[name].js',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2024-03-15 18:31:13 +00:00
|
|
|
},
|
2024-10-16 21:52:04 +00:00
|
|
|
pages: false,
|
2023-06-28 13:49:50 +00:00
|
|
|
buildDir: testWithInlineVue ? '.nuxt-inline' : '.nuxt',
|
2024-10-16 21:52:04 +00:00
|
|
|
sourcemap: false,
|
|
|
|
future: { compatibilityVersion: process.env.TEST_V4 === 'true' ? 4 : 3 },
|
|
|
|
experimental: {
|
|
|
|
externalVue: !testWithInlineVue,
|
|
|
|
},
|
|
|
|
compatibilityDate: '2024-06-28',
|
2023-06-28 13:49:50 +00:00
|
|
|
nitro: {
|
2024-04-05 18:08:32 +00:00
|
|
|
output: { dir: fileURLToPath(new URL(testWithInlineVue ? './.output-inline' : './.output', import.meta.url)) },
|
2023-06-28 13:49:50 +00:00
|
|
|
},
|
2024-10-16 21:52:04 +00:00
|
|
|
typescript: {
|
|
|
|
typeCheck: isStubbed ? false : 'build',
|
|
|
|
},
|
2023-03-16 07:34:22 +00:00
|
|
|
})
|