Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

render function made with compiler-core doesn't work, template works #2270

Closed
rhengles opened this issue Sep 29, 2020 · 1 comment
Closed

Comments

@rhengles
Copy link

Version

3.0.0

Reproduction link

https://codepen.io/rhengles/pen/vYGwGLr

Steps to reproduce

Compile a basic template with compiler-core:baseCompile which uses the <router-view> component, and pass to it the route object as a prop, or a computed value that uses the route object.

What is expected?

That I get the same output that I get from the template show below:

<div class="app--root">
	<router-view v-bind:route="routeWithModal"></router-view>
</div>

What is actually happening?

A warning is printed on the console:

test.html:81 [Vue warn]: Property undefined was accessed during render but is not defined on instance. 
  at <App>
warn	@	vue.global.js:1239
get	@	vue.global.js:7061
render	@	test.html:81

The test.html:81 line is shown below:

    const _Vue = Vue;
    return function render(_ctx, _cache) {
      with (_ctx) {
        const {
          createVNode: _createVNode,
          openBlock: _openBlock,
          createBlock: _createBlock
        } = _Vue;
        return (_openBlock(), _createBlock("div", {
          class: "app--root",
          ref: "refRoot"
        }, [
          _createVNode("router-view",
            { route: routeWithModal }, // <= error here
            null,
            8 /* PROPS */,
            ["route"]
          )
        ], 512 /* NEED_PATCH */))
      }
    };
@rhengles
Copy link
Author

I guess we're meant to use @vue/compiler-dom. We need documentation on this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant