Prevent Vue 3 from executing Vue 2 build#121
Open
rpbm1749 wants to merge 1 commit intoalexjoverm:masterfrom
Open
Prevent Vue 3 from executing Vue 2 build#121rpbm1749 wants to merge 1 commit intoalexjoverm:masterfrom
rpbm1749 wants to merge 1 commit intoalexjoverm:masterfrom
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed
Adds a defensive guard to the Vue 2 build to prevent it from running in a Vue 3 environment.
Why
When the Vue 2 build is executed under Vue 3, it crashes at runtime due to the unsupported
render(h)API, resulting in:TypeError: e is not a function.How
The guard detects Vue 3 at import time and throws a clear, actionable error instead of allowing a cryptic runtime failure.
Vue 2 behavior remains unchanged.
Fixes #120