Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(create-quasar): PNPM support #13615

Conversation

yusufkandemir
Copy link
Member

@yusufkandemir yusufkandemir commented Jun 5, 2022

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 dev branch (or v[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:

It's annoying to use rollup as a separate dep when it's deeply related
to Vite. Adding this supress the warning on both apps that are using
app-vite, and app-vite itself.
We are not directly using it in app-vite, so we can move it to devland.
This helps to avoid missing peer deep errors/warnings from autoprefixer,
which is installed on the default template, and is basically required.
Existing apps will not be affected because Vite also ships postcss as
a dependency.
@yusufkandemir yusufkandemir merged commit 079d616 into quasarframework:dev Sep 9, 2022
@yusufkandemir yusufkandemir deleted the feat-create-quasar-pnpm-support branch September 9, 2022 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants