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 = await jiti')
|
|
|
|
|
2023-03-16 07:34:22 +00:00
|
|
|
export default defineNuxtConfig({
|
2024-06-28 11:53:25 +00:00
|
|
|
compatibilityDate: '2024-06-28',
|
2024-07-16 10:08:21 +00:00
|
|
|
typescript: {
|
|
|
|
typeCheck: isStubbed ? false : 'build',
|
|
|
|
},
|
2024-02-15 10:07:39 +00:00
|
|
|
pages: false,
|
2023-06-28 13:49:50 +00:00
|
|
|
experimental: {
|
2024-04-05 18:08:32 +00:00
|
|
|
externalVue: !testWithInlineVue,
|
2023-06-28 13:49:50 +00:00
|
|
|
},
|
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
|
|
|
},
|
2023-06-28 13:49:50 +00:00
|
|
|
buildDir: testWithInlineVue ? '.nuxt-inline' : '.nuxt',
|
|
|
|
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-04-05 18:08:32 +00:00
|
|
|
sourcemap: false,
|
2023-03-16 07:34:22 +00:00
|
|
|
})
|