fix(core): correctly use toLowerCase for possible moduleResolution (#22160)

This commit is contained in:
Alexander Lichter 2023-07-16 00:48:03 +02:00 committed by GitHub
parent f068ad5edd
commit fed5868184
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,7 +47,7 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) {
buildDir: nuxt.options.buildDir,
experimental: {
// @ts-expect-error `typescriptBundlerResolution` coming in next nitro version
typescriptBundlerResolution: nuxt.options.experimental.typescriptBundlerResolution || nuxt.options.typescript?.tsConfig?.compilerOptions?.moduleResolution?.toLowercase() === 'bundler' || _nitroConfig.typescript?.tsConfig?.compilerOptions?.moduleResolution?.toLowercase() === 'bundler'
typescriptBundlerResolution: nuxt.options.experimental.typescriptBundlerResolution || nuxt.options.typescript?.tsConfig?.compilerOptions?.moduleResolution?.toLowerCase() === 'bundler' || _nitroConfig.typescript?.tsConfig?.compilerOptions?.moduleResolution?.toLowerCase() === 'bundler'
},
imports: {
autoImport: nuxt.options.imports.autoImport as boolean,