Closed MechJosh0 closed 3 years ago
Turns out this was due to rollup not being told heroicons
is an external dependency. Typically there are warning messages regarding this problem but because vue
was already listed as an external dependency for whatever reason it wasn't warning about heroicons
.
https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency
const external = [
"vue",
"@heroicons/vue/outline",
"@heroicons/vue/solid",
...
];
I'm trying to use heroicons in a Vue 3 component library. When importing the library into my main project it throws the following error in the browser:
And the following error is thrown in the terminal:
Obviously the error message is not very helpful in saying it's related to heroics, but I was able to narrow this down to be a heroicons issue by keeping everything else the same and just removing the heroicons imports and things work again.
Both the library and main projects are Vue v3.1.1, using heroicons/vue v1.0.1.