-
Notifications
You must be signed in to change notification settings - Fork 258
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
chore: compiler-dom as optionalDependencies #2107 #2177
Conversation
Otherwise you get with yarn berry an error @vue/test-utils tried to access @vue/compiler-dom (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound. May cause vuejs#1958 again. May fixes vuejs#2107.
✅ Deploy Preview for vue-test-utils-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot tell if optionalDependencies
is the correct one. Might be good to release a beta version and try it out?
Optional dependencies and optional peer-dependencies are two completely different things. A package listed in What appears to be happening here is just that: Note that as currently implemented, both "@vue/compiler-dom" and "@vue/server-renderer" aren't optional as the code fails to run without these packages installed:
Looking at the compiled output, this is because there are imports at the top of the file that still exist in an unchecked fashion regardless of whether not I believe the correct fix for this PR would be to make both @vue/compiler-dom and @vue/server-renderer optional peer dependencies (like @vue/server-renderer is currently implemented) and then to fix the imports so that we don't import/require from the packages unless you need to use them. |
I have put up an alternate PR for this: #2197 which at least for sure fixes the
That said, it's not great from a developer experience perspective, and I believe that is one of the reasons why |
In favor of #2197 |
Otherwise you get with yarn berry an error
@vue/test-utils tried to access @vue/compiler-dom (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound.
May cause #1958 again. May fixes #2107.