currentinstance value is null for the bundled component

Viewed 845

Version

3.0.0-beta.18

Reproduction link

https://github.com/anandkumarram/vue3lib
https://github.com/anandkumarram/vue3App

Steps to reproduce

  1. in vue3lib -> run : npm run build:es -> it will generate vue3lig.esm.js (bundled using rollup-plugin-vue) rollup.config.js : vue3lib\build\rollup.config.js
    vue3lig.esm.js : vue3lib\dist\vue3lib.esm.js

  2. in vue3App -> run : npm install --save ../vue3Lib && npm run serve. I have used the vue3lib as a plugin in vue3App and used a component name "sample".

What is expected?

All Components loaded from bundle(vue3lib.esm.js) should have componentinstance value

What is actually happening?

  1. currentinstance value is null in the Closure object.

  2. runtime-core.esm-bundler.js?821d:36 [Vue warn]: onMounted is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.

0 Answers
Related