Open duktiga-havet opened 4 years ago
It's a problem with this lib.
Abandoned project?
I dodged it by rebuilding my project without typescript
Getting the same thing as well.
Sadly, this nukes my production build, so I won't be able to use the lib.
Should this be prioritised to be fixed @antonreshetov ?
Proper bundling may solve this; see #34
I created mainjs.js
file.
import Vue from 'vue';
import Unicon from 'vue-unicons';
import { uniSave, uniBars, uniAngleLeftB, uniAngleLeft, uniListUl, uniBookOpen, uniBookAlt, uniHdd, uniCloud } from 'vue-unicons/src/icons.js';
Unicon.add([uniSave, uniBars, uniAngleLeftB, uniAngleLeft, uniListUl, uniBookOpen, uniBookAlt, uniHdd, uniCloud]);
Vue.use(Unicon);
Next, add following line in main.ts
.
import './mainjs';
It works in my project.
An update has been pushed which should fix all of the problems you guys have had. As I said in the PR, if there are any issues then let me know. Apologies for the wait, I see it's been a while! 👀
I'm getting the error below using vue-unicons in a Nuxt project with typescript.
I'm using the latest versions of vue-unicons (2.0.3), Nuxt (2.10.2) and nuxt/typescript (2.8.1).
I loaded it by writing the Nuxt vue plugin below:
The icons do appear but I can't make that error go away. Any idea how to look into this more deeply?
I'm not sure whether it's a problem with vue-unicons or with @nuxt/typescript or my code.