serkodev / nuxt-monorepo

Using Nuxt Layers to build a complete monorepo architecture
https://serko.dev/post/nuxt-3-monorepo
86 stars 9 forks source link

shamefully-hoist=true #1

Closed DavidDeSloovere closed 3 months ago

DavidDeSloovere commented 4 months ago

Thanks (again) for your blog post and this repo!

Is shamefully-hoist=true in the .npmrc still needed? I known it can be removed for regular nuxt apps since a few versions. But is it required for monorepo?

https://github.com/nuxt/nuxt/issues/14146

serkodev commented 3 months ago

You are welcome!

After referring to the issue, i think removing that option should be fine in general.

However, there might be some dependencies of your project that require this option to be enabled to function correctly in the future. I think you can decide whether to enable it based on the actual situation.

DavidDeSloovere commented 3 months ago

In my setup, with pnpm workspaces, I was having issues with import statement that were incorrect according to VS Code (TS server) for dependencies that were indirectly installed (ie. H3).

After adding shamefully-hoist=truethe imports were ok!

So there is a good reason to keep it.

serkodev commented 3 months ago

Oh seems it will be auto import error after disable shamefully-hoist, let me get it back, thanks!