vite icon indicating copy to clipboard operation
vite copied to clipboard

Support yarn2 and pnpm

Open pi0 opened this issue 4 years ago • 3 comments

Nuxt ships with implicit dependencies. Workaround for webpack supporting yarn plug-and-play is using [pnp-webpack-plugin](https://github.com/arcanis/pnp-webpack-plugin - https://github.com/nuxt/nuxt.js/pull/8389)

  • Vite related issue for pnpm: https://github.com/vitejs/vite/issues/324 suggested solution is pnpm install --shamefully-hoist.
  • Related: #89

pi0 avatar Mar 10 '21 10:03 pi0

@pi0 I have recently given a vuejs programming assignments to some of the students they have reported error which I haven't been able to observe in both node v14 and v16 with pnpm v6.8.0. The error being thrown is of missing @vitejs/plugin-vue so the vue files aren't parsed. Maybe I can get some help here. The reproduction code is at vue-task

Although I made sure to handle gotchas as stated in docs

nuxt.config.js

{
  generate: {
    // choose to suit your project
    interval: 2000,
  },
  ssr: false,
}

.npmrc

shamefully-hoist=true

king-11 avatar Jun 22 '21 13:06 king-11

@king-11 that's the vue 3 plugin which doesn't seem to be in your pnpm-lock.yaml. i read through your exercises and looked at the files you have the students working in, and my best guess is that your students are looking up resources about composition that are written with vue 3 in mind, and those two students with issues have added a dependency that is also written for vue 3. @vitejs/plugin-vue is also not in this repo's yarn.lock so it's almost certainly not caused by this package, even if this package shows up in the stacktrace.

replygirl avatar Jun 25 '21 01:06 replygirl

Any plans on support pnpm?

HenrijsS avatar Sep 09 '21 20:09 HenrijsS