Skip to content

pnpm support without --shamefully-hoist #14146

Description

@pi0

Update: Since v3.0 release, pnpm without shamefully-hoist flag works out of the box but there are still known issues to be addressed (in nuxt or upstream):

  • When pages enabled, vue-router dependency is implicit
  • Multiple instances of vue are can be resolved and used
  • Generated tyeps are not fully functional without hoisted node_modules

History: #11823

We have progressively improved plug-and-play support over time and almost all underlying packages including nitro support and are tested against pnpm.

Last step is making nuxt 3 working with pnpm out of the box before migrating modules and templates from first-class yarn to pnpm.

Using pnpm without --shamefully-hoist is possible today 🥳 but requires explicitly installing vue and ufo dependencies and we don't want this since Nuxt was always a zero-config package and we need to add deps of all nuxt modules as well this way.

One obvious solution is that same as Nitro, we internally (also for unimport ~> unjs/unimport#69) resolve them to their full path but we also need to support non-resolved implicit imports in templates as modules might have similar implicit dependencies in their scope and they need to be resolved as well. I think this can be done using a custom resolver for vite (and webpack).

Metadata

Metadata

Assignees

Labels

3.x✨ enhancementNew feature or improvement to existing functionality🍰 p2-nice-to-haveNice to have, not blocking

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions