Open Scipionh opened 2 years ago
Perhaps you need to be loading the ESM module rather than the CJS which is going to expect Vue to be declared globally?
I'm not sure what you are suggesting here. I'm using import
and in the vue-plugin/package.json
I can see:
"exports": {
".": {
"require": "./dist/highlightjs-vue.min.js",
"import": "./dist/highlightjs-vue.esm.min.js",
"types": "./dist/vue.d.ts"
}
},
So it should use the esm module.
Yet, the esm source never once references Vue
, so your error makes no sense?...
I am currently experienced the following error when running my unit tests:
ReferenceError: Vue is not defined
Here is my component code:
in my test file, I'm simply trying to mount this component:
Here are my libraries versions:
Is there any way I could tell him to simply ignore the
highlightjs
the component in thejest.config
?