unplugin / unplugin-icons

šŸ¤¹ Access thousands of icons as components on-demand universally.

Home Page:https://www.npmjs.com/package/unplugin-icons

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom icons problem

playertk opened this issue Ā· comments

customCollections: {
        // key as the collection name
        'my-icons': {
          play: '<svg><!-- ... --></svg>',
          // load your custom icon lazily
          settings: () => fs.readFile('../public/svg-icon/play.svg', 'utf-8'),
          /* ... */
        },
      },

// generated by unplugin-vue-components

 Iconplay: typeof import('~icons/ic/onplay')['default']

console.error

Icon `ic:onplay` not found

There seems to be a problem with the automatically generated path
The correct path is more likely to be like this

 Iconplay: typeof import('~icons/my-icons/play')['default']