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

importing bug #101

Open
Emir507 opened this issue Apr 6, 2022 · 5 comments
Open

importing bug #101

Emir507 opened this issue Apr 6, 2022 · 5 comments

Comments

@Emir507
Copy link

Emir507 commented Apr 6, 2022

vue-fuse.es.js is not importing properties correctly

`./node_modules/vue-fuse/dist/vue-fuse.es.js`
...
import { ref, computed, watch } from "vue";
...

 warning  in ./node_modules/vue-fuse/dist/vue-fuse.es.js
"export 'computed' was not found in 'vue'

 warning  in ./node_modules/vue-fuse/dist/vue-fuse.es.js
"export 'ref' was not found in 'vue'

 warning  in ./node_modules/vue-fuse/dist/vue-fuse.es.js
"export 'watch' was not found in 'vue'

it works if i change 'vue' on 'vue-demi' manually in node_modules folder

what do I do?

@jonadeline
Copy link

same here

@shayneo
Copy link
Owner

shayneo commented Apr 20, 2022

@Emir507 @jonadeline what version of vue are y'all on?

@Emir507
Copy link
Author

Emir507 commented Apr 21, 2022

@shayneo vue 2

@shayneo
Copy link
Owner

shayneo commented Apr 21, 2022

@Emir507 cool! do you have @vue/composition-api installed? it's required to use vue-fuse with vue 2

@jonadeline
Copy link

jonadeline commented Apr 29, 2022

I tried the composition-api method but it wasn't successful.
I finally ended up to import it this way in my component (within a nuxt project)

components: {
    VueFuse: () => {
      if (process.client) {
        // @ts-ignore
        return import('vue-fuse')
      }
    },
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants