You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Vue warn]: Error compiling template:
Hello
- Component template requires a root element, rather than just text.
Look at Tests tab and observe that both the "mount with default slot" and "shallowMount with default slot" are failing when using the default slot to pass some text to the TestComponent
What is expected?
All tests should pass. The two tests "with default slot" should match the expected html <button>Hello</button>
What is actually happening?
The 2 failing tests are rendering the html <button><div></div></button>
If you roll back to @vue/[email protected] the tests pass, so this is clearly a bug with the latest beta release.
The text was updated successfully, but these errors were encountered:
to me, this is similar to #693 . CompileToFunctions seems not handling text only. Since a string is not generating a valid AST and throwing errors, then maybe it makes sense to reconsider the approach and rely on the compile function only (where it makes sense).
Version
1.0.0-beta.18
Reproduction link
https://codesandbox.io/s/o1r1qw3qq
Steps to reproduce
src/TestComponent.spec.js
Console
tab and observe the error:Tests
tab and observe that both the "mount with default slot" and "shallowMount with default slot" are failing when using thedefault
slot to pass some text to theTestComponent
What is expected?
All tests should pass. The two tests "with default slot" should match the expected html
<button>Hello</button>
What is actually happening?
The 2 failing tests are rendering the html
<button><div></div></button>
If you roll back to
@vue/[email protected]
the tests pass, so this is clearly a bug with the latest beta release.The text was updated successfully, but these errors were encountered: