Skip to content

Library uses vue-demi with vue3, app uses vue2 but still vue-demi detects vue3 #121

@pareshchouhan

Description

@pareshchouhan

I am using vue-cli-service to compile my library which uses vue-demi and I develop the code using vue 3.2.X.
When I import the library in a vue2 project vue-demi detects vue3 is running instead of vue2.

This is a console log of following in my library, which I imported in my application.

import * as VueDemi from 'vue-demi';
console.log(VueDemi)

image

Here's a repo to reproduce it
https://github.com/pareshchouhan/vue-demi-test

In my library only thing I use vue-demi is for importing defineComponent

import { defineComponent } from 'vue-demi';

It crashes inside the library code when calling defineComponent
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions