Closed NexRX closed 8 months ago
I fixed this by doing the following after reading several issues here:
1) yarn add astro-icon@next
2) yarn add @iconify-json/ri
3) Change my astro.config.mjs to include:
import icon from "astro-icon";
export default defineConfig({
integrations: [icon({
iconDir: "src/assets/icons",
include: {
ri: ["*"],
},
}),
],
});
3) Change my import of Icon
: to
import { Icon } from "astro-icon/components";
I also upgraded to Astro 3 but i dont think that played a part, was still broken prior to the actions above. Anyone can explain why the documented installation method didnt work for me?
Hi, I just got started with Astro yesterday and im trying to bootstrap an app. Everything was building fine untill I tried to build with astro-icons.
In
astro dev
everything will load and run fine, but runningastro build
will fail with the following error:In my
src/pages/index.astro
im using the icons as such:Is it something I am doing? I saw an old issue with the same problem as me and followed the steps that fixed it at the time but they no longer work and so i rolled them back (like the last comment says to) Issue: https://github.com/natemoo-re/astro-icon/issues/2
If it helps, here is my package.json deps: