feat(create-quasar): PNPM support
What kind of change does this PR introduce?
- Feature
Does this PR introduce a breaking change?
- No
The PR fulfills these requirements:
- It's submitted to the
devbranch (orv[X]branch)
Other information:
shamefully-hoist=true is for allowing app code to access dependencies in @quasar/app-* packages. One example would be @quasar/fastclick, which is used for iOS on PWA and Cordova. We inject this into auto-generated entry files, which are actually part of the app, so it will not be able to access the dependency defined in @quasar/app-* packages and will result in errors. We can choose to make it a peer dependency of @quasar/app-* packages and make it part of the starter kit. But, since that's not the only thing, we would be making the starter kits confusing and bloated, and they will be harder to update/manage, if it becomes not needed, we can't simply remove it, etc.
For app-webpack there are lots of packages, so I don't see really see hope in a "shamefully-hoist-less" app-webpack. ~~For app-vite however, if I am not missing something, the only dependency with a runtime reference is @quasar/fastclick, so we can decide to move it to devland to be able to go "shamefully-hoist-less".~~ There are also express, compress, etc. and their respective @types/* packages too. So, we would need to go on a longer route, which is probably not a good idea, at least for now.
Nuxt is also doing shamefully-hoist=true, in fact, their starter kit only has nuxt as a dev dependency, the rest including vue and vue-router is shared(not using exact pins). It would have at least been a problem in terms of import suggestions(like we had in #9235), but that's not a problem because they offer auto-imports.
strict-peer-dependencies=false is for avoiding the need for installing internal libraries like webpack, vite, etc. on devland. Installing webpack, vite, etc. loaders/plugins start enforcing this, so it's annoying without any real benefit at the app level for a framework like this IMO.
Needs these for full PNPM support experience:
- #13609
- #13106
- #12809
- More documentation changes
- Messages/logs inside q-app messages/instructions. An instruction like "Run
npm run xoryarn x" should also cover PNPM. Ideally, we should only display the instructions for the package manager the user is using.