pnpm support without `--shamefully-hoist`
See original GitHub issueUpdate: 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: #581
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
~> https://github.com/unjs/unimport/issues/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).
Issue Analytics
- State:
- Created a year ago
- Reactions:78
- Comments:19 (6 by maintainers)
Top GitHub Comments
@jpsc Hi, made a PR in your repo, so you can check, also the fork is available on my profile here nuxt3-pnpm-monorepo
Glad to see there’s movement on this. I didn’t get an answer to my question, though, and I don’t want it to be lost: when this issue is closed, will Yarn Berry PnP support work too? If not, is there a separate place that is being tracked? I couldn’t find one; they’ve all been closed in favour of this issue, which doesn’t mention yarn at all.