mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-21 21:25:11 +00:00
feat(nuxt): support separate server tsconfig (#20559)
This commit is contained in:
parent
e9b2f6286c
commit
33e2bd3dc0
@ -92,7 +92,9 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) {
|
||||
layer => resolve(layer.config.srcDir, 'app.config')
|
||||
),
|
||||
typescript: {
|
||||
generateTsConfig: false
|
||||
strict: true,
|
||||
generateTsConfig: true,
|
||||
tsconfigPath: 'tsconfig.server.json'
|
||||
},
|
||||
publicAssets: [
|
||||
nuxt.options.dev
|
||||
|
@ -1,3 +1,9 @@
|
||||
let counter = 0
|
||||
|
||||
const test = () => () => {
|
||||
// TODO: useNuxtApp should be undefined when type-testing a nitro route
|
||||
useNuxtApp()
|
||||
}
|
||||
test()
|
||||
|
||||
export default defineEventHandler(() => ({ count: counter++ }))
|
||||
|
3
test/fixtures/basic/server/tsconfig.json
vendored
Normal file
3
test/fixtures/basic/server/tsconfig.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "../.nuxt/tsconfig.server.json"
|
||||
}
|
Loading…
Reference in New Issue
Block a user