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?
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 ofUnexpected token export
onnode_modules/popper.js/dist/popper-utils.js:1002
.I believe this is because of
vue-directive-tooltip
's inclusion ofpopper.js/dist/popper-utils
. Its inclusion ofpopper.js
works fine because popper.js'package.json
has amain
andmodule
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... :(