[backport v2.8.next2] [Extensions] Expose UMD Builds of Vue to the window
Object
#10569
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an automated request to port PR #10544 by @rak-phillip
closes #10568
Original PR body:
Summary
This resolves an error where importing extensions that utilize backported features will throw the error
object(...) is not a function
by explicitly importingvue.runtime
to ensure that Dashboard is always exposing the UMD builds of Vue to thewindow
object. This error originally occurred because different builds of Vue (ESM vs. UMD) are used depending on the environment; there are differences in how backported Vue 3 features are exposed in Vue 2.71, so it's important that the intended build is explicitly attached to thewindow
object so that extensions can be imported without error.For more information on different builds that are available to us, see the vue documentation for explanation of different builds 2.
This also bumps the
UI_PLUGIN_API_VERSION
to signal that upcoming changes to UI extensions will be incompatible with older versions of Dashboard. A version of 1.2.0 or higher will be required for extensions that utilize backported Vue 3 features that are available in Vue 2.7.Fixes #10543
Areas or cases that should be tested
Screenshots
Screen.Recording.2024-03-05.at.16.47.21.mov
Checklist
Footnotes
https://v2.vuejs.org/v2/guide/migration-vue-2-7.html#Notes-on-API-exposure ↩
https://v2.vuejs.org/v2/guide/installation#Explanation-of-Different-Builds ↩