-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Closed
Description
Vue version
3.6.0-alpha.2
Link to minimal reproduction
Steps to reproduce
- Prepare 2 template-only components (named
AandB)
<!-- A.vue -->
<template>
<div><slot /></div>
</template>
<!-- B.vue -->
<template>
<div>Testing</div>
</template>- in
App.vue, useAandBcomponent, withBinA
<!-- App.vue -->
<template>
<A><B /></A>
</template>- Ensure vue is in vapor only mode (or
App.vueis in vapor mode) - Go to website
What is expected?
Vue should render App.vue like non-vapor mode (VDOM mode?)
with <div><div>Testing</div></div> as rendered content
What is actually happening?
Error occured when rendering:
Uncaught TypeError: can't access property "insert", block is undefined
insert https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.runtime-with-vapor.esm-browser.js:13114
insert https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.runtime-with-vapor.esm-browser.js:13117
mountComponent https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.runtime-with-vapor.esm-browser.js:14353
insert https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.runtime-with-vapor.esm-browser.js:13107
slot https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.runtime-with-vapor.esm-browser.js:13527
patch https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.runtime-with-vapor.esm-browser.js:7123
mountChildren https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.runtime-with-vapor.esm-browser.js:7377
mountElement https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.runtime-with-vapor.esm-browser.js:7296
processElement https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.runtime-with-vapor.esm-browser.js:7261
patch https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.runtime-with-vapor.esm-browser.js:7127
fn https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.runtime-with-vapor.esm-browser.js:7817
run https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.runtime-with-vapor.esm-browser.js:1791
setupRenderEffect https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.runtime-with-vapor.esm-browser.js:7947
mountComponent https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.runtime-with-vapor.esm-browser.js:7682
insert https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.runtime-with-vapor.esm-browser.js:13587
insert https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.runtime-with-vapor.esm-browser.js:13115
mountComponent https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.runtime-with-vapor.esm-browser.js:14353
mountApp https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.runtime-with-vapor.esm-browser.js:14415
mount https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.runtime-with-vapor.esm-browser.js:6359
mount https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.runtime-with-vapor.esm-browser.js:14451
mount https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.runtime-with-vapor.esm-browser.js:13677
_mount about:srcdoc line 64 > injectedScript:21
<anonymous> about:srcdoc line 64 > injectedScript:26
vue.runtime-with-vapor.esm-browser.js:13114:9
System Info
Windows 11 (64-bit), Firefox 144.0.2Any additional comments?
I noticed that if either A or B component explicitly defined it is a vapor component, it would fix the render issue.
Checked the compiled code for A and B component in playground, saw that it is compiled as non-vapor component.
I also found that having vapor attribute in <template> also fix this issue.
But in my newly created project, I would like it to be in full vapor mode, defined with createVaporApp, and hope that there's a config in vue compiler to default as vapor mode instead.
Metadata
Metadata
Assignees
Labels
No labels