-
-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
After overhauling icons (and including component support) in 2.0.0-next.14, there currently is a requirement to setup unplugin-icons to process the ~icons/*
imports that are used by default, but I'm hoping to not require this in the future (only needed due to using it to load the default Lucide iconset in settings()
.
To setup unplugin-icons with Lucide iconset, first install 2 packages:
pnpm i -D unplugin-icons @iconify-json/lucide
Then update your vite.config.js
(example) to process the ~icons/*
import { sveltekit } from '@sveltejs/kit/vite';
import tailwindcss from '@tailwindcss/vite';
import Icons from 'unplugin-icons/vite';
/** @type {import('vite').UserConfig} */
const config = {
plugins: [
tailwindcss(),
sveltekit(),
Icons({
compiler: 'svelte',
}),
],
optimizeDeps: {
exclude: ['~icons'],
},
};
export default config;
Unplugin-icons is wonderful and I use it on all my projects (along with the Icônes icon browser) but it probably shouldn't be required, or at least the setup is streamlined.
HassanHeydariNasab
Metadata
Metadata
Assignees
Labels
No labels