Nuxt/test/fixtures/basic/nuxt.config.ts
pooya parsa 2e85cd0252
refactor(nuxt): add treeshakeClientOnly experimental flag (#5934)
* refactor(nuxt): add `treeshakeClientOnly` experimental flag

* test: enable flag for fixture
2022-07-17 15:13:04 +02:00

35 lines
790 B
TypeScript

import { defineNuxtConfig } from 'nuxt'
import { addComponent } from '@nuxt/kit'
export default defineNuxtConfig({
buildDir: process.env.NITRO_BUILD_DIR,
builder: process.env.TEST_WITH_WEBPACK ? 'webpack' : 'vite',
extends: [
'./extends/bar',
'./extends/node_modules/foo'
],
nitro: {
output: { dir: process.env.NITRO_OUTPUT_DIR }
},
publicRuntimeConfig: {
testConfig: 123
},
privateRuntimeConfig: {
privateConfig: 'secret_key'
},
modules: ['~/modules/example'],
hooks: {
'modules:done' () {
addComponent({
name: 'CustomComponent',
export: 'namedExport',
filePath: '~/other-components-folder/named-export'
})
}
},
experimental: {
reactivityTransform: true,
treeshakeClientOnly: true
}
})