-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Yarn Plug'n'Play Support #8286
Comments
@tgrelka Does moving to Webpack 5 solve this issue directly or is a plugin still needed? |
It no longer needs the plugin, though I'm not yet sure what else needs changing in quasar. I haven't had much time at work lately to investigate this further, but I will try to get to it as soon as I can. |
I will postpone looking into this until |
For the sanity, marking as duplicate of #7581 |
Is your feature request related to a problem? Please describe.
I'm using the latest yarn (v2.4.0), currently with the
node-modules
linker but would like to switch to the more modern UP'n'P, which has become the default for Yarn 2.When removing the
nodeLinker: node-modules
option, thegetQuasarAppExecutable
function fails to resolve@quasar/app
since the environment is missing UP'n'P capabilities. This can, however, be fixed by adding an environment variableNODE_OPTIONS="--require <path-to-.pnp.js>"
linking to the.pnp.js
of the project folder. This can be done using--require .\.pnp.js
and works just fine, instead of Quasar CLI help displaying, Quasar App is started and dev server is launched. However, down the line,getPackageJson
seems to return undefined, likely becauserequire('../../package.json')
cannot be resolved.Describe the solution you'd like
Yarn 2/P'n'P should work out of the box with Quasar, without needing to set environment variables manually or throwing errors.
It took me a bit until I figured out that
nodeLinker: node-modules
was required for Quasar to work, making the experience of using the latest yarn (always recommended) have a few hiccups.Describe alternatives you've considered
I'm currently working on investigating all issues with Yarn 2 P'n'P and trying to resolve them, however, at work there is only so much time I can spend working on outside projects. I will look into this more in my free time, but I need to get comfortable with Quasars App code first, understanding the CLI package was easy due to its small size.
As such, any help, additional issue reports and hints are appreciated!
Additional context
quasar d
working (instead of displaying cli help page after@quasar/app
couldn't be resolved) after setting environment variable, but quickly failing due to path resolving issues.Some Notes
Webpack v4
has no native support for UPnP, however there ispnp-webpack-plugin
which adds support. If PnP is supported natively by quasar, this should be installed in quasars webpack config. Webpack 5 ships with native support for UPnP.While that makes it easier for any version shipping with Webpack 5 (Quasar 2 hopefully 😉), even if Quasar 1 won't get Webpack 5 support, I’d still like this feature to be in App v2, since it makes using Quasar with yarn easy out of the box and is also the version we will stay on for a little while at our company, and likely will others until Vue 3 has matured. This also means I’ll be working on fixing issues with the current App version instead of working in
vue3-work
.For me at least, that will make my efforts worthwhile, and I hope I'm able to resolve all issues surrounding yarn v2 (with any help greatly appreciated as my resources are limited.)
Edit: Hitting Ctrl+Enter accidentally sends the issue, oops. Finished my description now.
Edit 2: Yes, I know I’m not on latest quasar yet, just got back to work this morning and am still updating all deps, however I wanted to get this issue opened asap to see if anybody already has done some work on Yarn v2 P'n'P. Now tested: As expected it does not work on latest quasar.
The text was updated successfully, but these errors were encountered: