mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-24 14:45:15 +00:00
dadf50dbcd
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Daniel Roe <daniel@roe.dev>
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
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({
|
|
$production: {
|
|
vite: {
|
|
$client: {
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
chunkFileNames: '_nuxt/[name].js',
|
|
entryFileNames: '_nuxt/[name].js',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
pages: false,
|
|
buildDir: testWithInlineVue ? '.nuxt-inline' : '.nuxt',
|
|
sourcemap: false,
|
|
future: { compatibilityVersion: process.env.TEST_V4 === 'true' ? 4 : 3 },
|
|
experimental: {
|
|
externalVue: !testWithInlineVue,
|
|
},
|
|
compatibilityDate: '2024-06-28',
|
|
nitro: {
|
|
output: { dir: fileURLToPath(new URL(testWithInlineVue ? './.output-inline' : './.output', import.meta.url)) },
|
|
},
|
|
typescript: {
|
|
typeCheck: isStubbed ? false : 'build',
|
|
},
|
|
})
|