You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found the solution (at least, for me). I had import {IoIosTrendingUp, IoIosCode, IoIosLaptop } from 'react-icons/io which works in development but fails on build.
After much effort, I inspected the folder and file structures of the react-icons library, then, found all the icons were also exported in the index page (also in the index.esm but that isn't useful) and imported the font/icons from it (the index.js page). Short story long, I modified the above import line to import {IoIosTrendingUp, IoIosCode, IoIosLaptop } from 'react-icons/io/index and that solved it for me.
Basically, add "index" after the specific library you are using e.g react-icons/md should be react-icons/md/index. That's all.
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Link to the code that reproduces this issue
https://github.com/omgismartinez/eye/blob/dev/config/site.ts
To Reproduce
Current vs. Expected behavior
It is only an object where it is specified which is the icon that makes reference to the route, the
lucide-react
library is used.In development it works fine but when building it fails.
Verify canary release
Provide environment information
Which area(s) are affected? (Select all that apply)
Not sure, SWC minifier (swcMinify: true), SWC transpilation
Additional context
.ts
to.tsx
but the error persists.The text was updated successfully, but these errors were encountered: