unplugin / unplugin-icons

🤹 Access thousands of icons as components on-demand universally.
https://www.npmjs.com/package/unplugin-icons
MIT License
3.66k stars 131 forks source link

Cannot read properties of undefined (reading 'replace') #264

Open binsarjr opened 1 year ago

binsarjr commented 1 year ago

Describe the bug

icon resolver not working on svelte (laravel inertia)

// vite.config.js
Icons({
    compiler: 'svelte',
    autoInstall: true
}),
IconsResolver({
    prefix: 'icon'
}),

Reproduction

IconsResolver()

System Info

System:
    OS: Linux 6.0 Archcraft
    CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
    Memory: 5.83 GB / 11.57 GB
    Container: Yes
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 19.0.1 - /bin/node
    Yarn: 1.22.19 - /bin/yarn
    npm: 8.19.2 - /bin/npm
  Browsers:
    Firefox: 106.0.5

Used Package Manager

pnpm

Validations