-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
What package is covered by this investigations?
Describe the goal of the investigation
The goal is to help vue-cli reach a seamless support of [email protected]
For reference: vuejs/vue-cli#5135
Investigation report
Hello Yarn team! First of all, thanks for your incredible work. Lately, vue-cli released 4.2.0 with better support for yarn v2. So I was eager to try how good it was, I've created a working example repo here: https://github.com/AlexandreBonaventure/workspace-yarn2-example
As you can see, there are a couple of things/PRs to merge in third-party tooling to reach 100% support, but overall it is working just fine!
However, I stumble upon an issue when building the project with --modern
mode.
Here: https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-service/lib/commands/build/index.js#L64
Vue-cli service is spawning a sub process of itself, but this is breaking in the virtual context. (you can workaround it by running yarn unplug @vue/cli-service
)
The error Error: spawn /project-folder/.yarn/$$virtual/@vue-cli-service-virtual-6a585d6e2c/0/cache/@vue-cli-service-npm-4.2.2-fad0399727-1.zip/node_modules/@vue/cli-service/bin/vue-cli-service.js ENOENT
I'm willing to create a PR in vue-cli, but don't even know what would be the best way to solve it. Is there any best practice you would recommend when you want to self-reference? Can you guys help me figure out how to make it work in the virtual context ?
Thanks for your help !