Skip to content

Migration Build does not pass h to render functions as argument #3872

@mrts

Description

@mrts

Version

3.1.0-beta.6

Reproduction link

https://github.com/tamland/bootstrap-vue3-compat

Steps to reproduce

  1. Create a new project that uses @vue/compat v3.1.0-beta.6 and bootstrap-vue 2.21.2 or clone https://github.com/tamland/bootstrap-vue3-compat.
  2. Run npm run serve to start the dev server.
  3. Open the application in any browser.

What is expected?

BootstrapVue components work.

What is actually happening?

Some of the simple components like b-btn do work, but most components do not, resulting in the following error:

vue.runtime.esm-bundler.js?1786:4627 Uncaught TypeError: h.bind is not a function
    at eval (vue.runtime.esm-bundler.js?1786:4627)
    at Array.map (<anonymous>)
    at callHookWithMixinAndExtends (vue.runtime.esm-bundler.js?1786:4627)
    at callSyncHook (vue.runtime.esm-bundler.js?1786:4612)
    at applyOptions (vue.runtime.esm-bundler.js?1786:4358)
    at finishComponentSetup (vue.runtime.esm-bundler.js?1786:9868)
    at setupStatefulComponent (vue.runtime.esm-bundler.js?1786:9778)
    at setupComponent (vue.runtime.esm-bundler.js?1786:9709)
    at mountComponent (vue.runtime.esm-bundler.js?1786:7228)
    at processComponent (vue.runtime.esm-bundler.js?1786:7199)

The problem is caused by render function API change.

In 2.x, the render function would automatically receive the h function as an argument. In 3.x h is now globally imported instead of passed to render functions as an argument.

The compatibility build should provide a wrapper that restores the h function argument of render functions.

This is holding back Vue 3 migration in BootstrapVue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions