Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 264bf98

Browse files
committed
fix(nuxt): clone paths to prevent shared object
1 parent 7252b56 commit 264bf98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/nuxt/src/core/nuxt.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ async function initNuxt (nuxt: Nuxt) {
7272

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

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

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

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

0 commit comments

Comments
 (0)