bassdman/vue-feature-toggle

v2.0.5 still has the warning issue

Closed this issue · 4 comments

Seems like dist wasn't updated... should I open a new PR to build the project to dist?

yes, this is a good idea. I tried setting up a new project with the vue-cli, but with my settings I can not reproduce this warning...

My settings:

  • newest vue-cli
  • vue3
  • current vue-feature-toggle library

Update: I can reproduce it - this occurs with vue2.

The import { h } from 'vue';
is new in vue3, it does not exist in vue2. Because the plugin can be used with vue2 and vue3, it can happen (if used with vue2), that the import does not exist and it logs the message "export 'h' (imported as 'vue') was not found in 'vue'".
Also more complex versions, as now used, produce this log.

The only solution I have ist using two files - one for vue2 and one for vue3... and if the wrong file is used, I can write a console-log that the other file is better...
Are there better ideas? Is this a good idea?

my pr did fix it for the source, but not in the dist folder. i'm new to building npm packages, in my experience that folder is for builds. i guess that's wrong? you can just copy over the change i made to any mention of vue.h and the issue is resolved. the reasoning is in the issue i mentioned in a comment to the pr

thank you for your adivce. You're right. I just forgot building the files again.
I've added it, fix can be found in v. 2.0.6