Subscribe on changes!

Reactivity across different libraries does not work

avatar
Nov 7th 2020

Version

3.0.2

Reproduction link

https://github.com/iendeavor/reactivity-across-libraries

Steps to reproduce

  1. Build

    cd third-party-library
    yarn install
    yarn build
    yarn link
    
    cd ../app
    yarn install
    yarn link third-party-library
    yarn serve
    
  2. Visit http://localhost:8080/

  3. Open the console

  4. Click button

  5. Only the app, and bar works

What is expected?

The foo watcher should be invoked.

What is actually happening?

Only the app and bar watchers are invoked.


I'm not really sure this is a bug or not.

If not, what can I do to achieve same feature?

Thanks~

avatar
Nov 7th 2020

This is normal and to avoid it you need to link vue in both libraries and applications that use linked libraries. There will be a note on docs.

You can also use yarn pack to avoid the issue, you should take a look at existing issues for a full command