hekigan / vue-directive-tooltip

Vue.js tooltip directive. Easy to use, configure and style
https://hekigan.github.io/vue-directive-tooltip/
MIT License
173 stars 33 forks source link

Popper-utils include requires ESM support #19

Closed timwis closed 7 years ago

timwis commented 7 years ago

Including vue-directive-tooltip in my project works fine in the browser because webpack can handle ES modules (export), but when I run my unit tests (in node) they fail because of Unexpected token export on node_modules/popper.js/dist/popper-utils.js:1002.

I believe this is because of vue-directive-tooltip's inclusion of popper.js/dist/popper-utils. Its inclusion of popper.js works fine because popper.js' package.json has a main and module property, letting the compiler/bundler choose which file to use. But importing the explicit /dist/popper-utils.js file requires ES module support.

I think switching this to popper.js/dist/umd/popper-utils would work, but then you wouldn't be able to leverage webpack's ES module support :(

Alternatively, perhaps we can just remove the dependency entirely, since it's just a set style function. Set the styles another way, or copy the utility function into this project?

Front-end development is fun... :(