-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(build): fix component resolution when disabling options API
fix #1688
- Loading branch information
Showing
3 changed files
with
44 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a75b8a2
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.
Note for
@vue/test-utils
:instance.components
is now removed because the component resolution now directly checksinstance.type.components
(local) and then fallbacks toinstance.appContext.components
(global). This removes the constant cost of creating two extra asset objects on each instance.This may affect VTU's stubbing behavior but it should be possible to fix it while retaining backwards compat: https://github.com/vuejs/vue-test-utils-next/blob/master/src/stubs.ts#L100
/cc @cexbrayat @lmiller1990 @dobromir-hristov @JessicaSachs @afontcu
a75b8a2
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.
@yyx990803 Thanks for the heads up! I think we're good for the code you linked IIUC, as I was already checking
instance.type.components
? But thematches
logic infindComponent
will need to be fixed https://github.com/vuejs/vue-test-utils-next/blob/master/src/utils/find.ts#L45We'll check it out when
rc.5
is releaseda75b8a2
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.
Thanks for the heads up @yyx990803, we will keep on top of this. I think you are right @cexbrayat about
findComponent
, but it looks like it should be a pretty straight forward fix.