question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Skypack version of vue-demi imports vue 2 but sets isVue3 to true

See original GitHub issue

https://cdn.skypack.dev/-/vue-demi@v0.11.0-TmCmtDOAoOKuMLLEdJI0/dist=es2020,mode=imports/optimized/vue-demi.js

export * from "/-/vue@v2.6.14-ZwqBV9vu181DzQDewEXR/dist=es2020,mode=imports/optimized/vue.js";
import * as vue from "/-/vue@v2.6.14-ZwqBV9vu181DzQDewEXR/dist=es2020,mode=imports/optimized/vue.js";
export {vue as Vue};
var isVue2 = false;
var isVue3 = true;

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
sibbngcommented, Jul 15, 2021

Since Skypack doesn’t have any way to override package versions (query variables etc.) I would suggest using jspm and import maps. vue-demi’s functionality comes from it’s post install hook which is where controls your vue version. In browser doing something like that possible with import maps.

I’m pretty sure you are not working on anything serious, and neither I do. That because I had experienced @vueuse/core + reactivue previously to see how vue-demi works in browser. Here it is: https://focused-williams-cf307d.netlify.app/ You can do CTRL+U for source code. I linked vue to reactivue in this example but in your case you can simply link it to vue 3. For generating import maps https://generator.jspm.io/ could help.

The least thing we could do is to release 3 versions at the same time - vue-demi@latest vue-demi@v2 vue-demi@v3. But not sure if it’s worth it at the current stage.

It will also require packages (fluent-vue, @vueuse/core etc) to release under 2 different tags. Since vue-demi isn’t supposed to be used in that way it would be an unnecessary effort.

0reactions
antfucommented, Jul 15, 2021

The least thing we could do is to release 3 versions at the same time - vue-demi@latest vue-demi@v2 vue-demi@v3. But not sure if it’s worth it at the current stage.

Read more comments on GitHub >

github_iconTop Results From Across the Web

v0.12.0 import mjs issue · Issue #106 · vueuse/vue-demi · GitHub
I upgrade @vue/composition-api from 1.1.5 to 1.2.4, and it emit error. Error: [vue-composition-api] must call Vue.use(VueCompositionAPI) ...
Read more >
vue.js - "export 'default' (imported as 'Vue') was not found in 'vue'
I'm using Vue 3 but the code I'm studying is Vue 2. My code Vue 2 in main.js import Vue from 'vue' import...
Read more >
npm:vue-condition-watcher - Skypack
First you need to create a fetcher function, use the native fetch or libs like Axios. Then import useConditionWatcher and start using it....
Read more >
Build a universal Vue component library with Vue Demi
Learn how to use Vue Demi, a tool that allows developers to build universal libraries for Vue 2 and Vue 3 without the...
Read more >
Vue 3 Migration Changes: Replace, Rename, and Remove (Pt ...
A list of essential deprecated changes from Vue 2 to Vue 3. Download the free Migration Cheat Sheet.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found