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

External composable libraries reactivity broken #71

Closed
pikax opened this issue May 7, 2020 · 2 comments
Closed

External composable libraries reactivity broken #71

pikax opened this issue May 7, 2020 · 2 comments

Comments

@pikax
Copy link
Contributor

pikax commented May 7, 2020

Describe the bug

Composable libraries that rely on @vue/runtime-core have their reactivity system broken.

For example vue-composable uses @vue/runtime-core as peerDependency.

When used with vite, because of vite uses the runtime.esm-browser it will include all the reactivity system in one file, making the third-party libraries that rely on runtime-core broken.

System Info

  • required vite version: 0.11.1
  • required Operating System: Windows 10
  • required Node version: 14.1
  • Optional:
    • yarn version: 1.22.4
    • Installed vue version: beta.9
    • Installed @vue/compiler-sfc version: beta.9

Reproduction

Install vite and use this component as App.vue

Fixes

This can be fixed by changing the import on the third-party to vue instead of runtime-core.
Ideally I would expect the runtime-core to be a proxy of vue

@yyx990803
Copy link
Member

vite actually can directly support the esm-bundler builds, so we should just use it.

@pikax
Copy link
Contributor Author

pikax commented May 7, 2020

Now it works ⚡ thanks ⚡

@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants