Skip to content

Commit

Permalink
fix(nuxt): clone paths to prevent shared object
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Mar 9, 2024
1 parent 7252b56 commit 264bf98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/nuxt/src/core/nuxt.ts
Expand Up @@ -72,7 +72,7 @@ async function initNuxt (nuxt: Nuxt) {

// Set nitro resolutions for types that might be obscured with shamefully-hoist=false
nuxt.options.nitro.typescript = defu(nuxt.options.nitro.typescript, {
tsConfig: { compilerOptions: { paths } }
tsConfig: { compilerOptions: { paths: { ...paths } } }
})

// Add nuxt types
Expand All @@ -88,7 +88,7 @@ async function initNuxt (nuxt: Nuxt) {
opts.references.push({ path: resolve(nuxt.options.buildDir, 'types/app.config.d.ts') })

// Set Nuxt resolutions for types that might be obscured with shamefully-hoist=false
opts.tsConfig.compilerOptions = defu(opts.tsConfig.compilerOptions, { paths })
opts.tsConfig.compilerOptions = defu(opts.tsConfig.compilerOptions, { paths: { ...paths } })

for (const layer of nuxt.options._layers) {
const declaration = join(layer.cwd, 'index.d.ts')
Expand Down

0 comments on commit 264bf98

Please sign in to comment.