8000 GitHub - nooooooom/vue-module-demi: ⚖️ Ensure module export consistency for Vue2 & 3 · GitHub
[go: up one dir, main page]

Skip to content

About

⚖️ Ensure module export consistency for Vue2 & 3

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

24 Commits

Folders and files

Repository files navigation

vue-module-demi npm version

Module '"vue"' has no exported member 'Fragment'

When I was developing a library compatible with Vue2 & 3, I often encountered work that could not continue because the two packages did not export similar modules.

For example, I wanted to assert whether the current VNode type is Fragment. I Can't import Fragment from Vue for comparison because ESM doesn't allow destructuring imports that don't exist, and if I use import * as Vue from 'vue' and Vue.Fragment, it won't be tree-shaking friendly.

Overall, this library smooths out the inconsistency of Vue2 & 3 modules export. If a module doesn't exist, it will be exported as undefined in Vue2.

About

⚖️ Ensure module export consistency for Vue2 & 3

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0