Describe the bug
Similar to: #378 (comment)
We're using SvelteKit with Svelte 4 for context.
We publish a component library on our team. We want to use unplugin-icons in that library, as well as in the projects which consume that library. Currently we can build the component library just fine, but when we try to use the components in a another project we get:
✘ [ERROR] Could not resolve "~icons/tabler/menu-2"
node_modules/[our component library][a component].svelte:47:22:
47 │ import IconMenu2 from "~icons/tabler/menu-2";
Reproduction
Create library using unplugin-icons. Use that library in another project and attempt to build.
System Info
System:
OS: macOS 15.4.1
CPU: (14) arm64 Apple M3 Max
Memory: 167.67 MB / 36.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.8.0 - ~/.nvm/versions/node/v22.8.0/bin/node
npm: 10.8.2 - ~/.nvm/versions/node/v22.8.0/bin/npm
Browsers:
Chrome: 135.0.7049.115
Safari: 18.4
Used Package Manager
npm
Validations
Describe the bug
Similar to: #378 (comment)
We're using SvelteKit with Svelte 4 for context.
We publish a component library on our team. We want to use unplugin-icons in that library, as well as in the projects which consume that library. Currently we can build the component library just fine, but when we try to use the components in a another project we get:
Reproduction
Create library using unplugin-icons. Use that library in another project and attempt to build.
System Info
System: OS: macOS 15.4.1 CPU: (14) arm64 Apple M3 Max Memory: 167.67 MB / 36.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 22.8.0 - ~/.nvm/versions/node/v22.8.0/bin/node npm: 10.8.2 - ~/.nvm/versions/node/v22.8.0/bin/npm Browsers: Chrome: 135.0.7049.115 Safari: 18.4Used Package Manager
npm
Validations