Skip to content

Nested Vue component does not render when bundled separately using Webpack for Options API #12907

Closed Answered by skirtles-code
gerteck asked this question in Help/Questions
Discussion options

You must be logged in to vote

I don't think this is a bug in Vue Core, I think it's just a problem with the webpack config.

The warnings you're seeing typically indicate that there are two copies of Vue being used at runtime. The Vue application is using one copy of Vue but a component within it is using a different copy. As a result, functions like resolveComponent fail because they rely on global context variables being set, but those are set within the other copy of Vue. Other functions, like provide and inject, would fail in a similar manner if you were using them.

In the Composition API example you're importing Test2 directly, so it no longer relies on resolveComponent. That dodges the issue, but it isn't really …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gerteck
Comment options

Answer selected by gerteck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #12905 on February 19, 2025 00:13.