A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/vueuse/vue-demi/issues/41 below:

[Discussion] Shall we add something like `Vue2` to vue-demi's export? · Issue #41 · vueuse/vue-demi · GitHub

My use case is to config ignoredElements only in Vue 2. Currently we may use:

import { Vue, isVue2 } from 'vue-demi'

if (isVue2) {
  Vue.config.ignoredElements.push(...)
}

The problem is that when this code is run with Vue 3, Vue contains all tree-shakable exports which is not ideal.

So shall we add a Vue2 export from vue-demi so that we can use it like:

import { Vue2 } from 'vue-demi'

if (Vue2) {
  Vue2.config.ignoredElements.push(...)
}

And in Vue 3 mode we just export undefined from vue-demi so it doesn't hurt the bundle size.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4