Closed chris-lee-code closed 3 years ago
It's been 7 days since I reported this issue. Are there still problems duplicating the issue? I need an update.
This is happening to me when updating from version 11.0.0
to 11.0.1
. These lines are getting removed from next-env.d.ts
:
declare module "*.svg" {
const content: any
export default content
}
Which is what breaks the icons for me.
What's the fix?
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
What version of Next.js are you using?
11.0.1
What version of Node.js are you using?
16.2.0
What browser are you using?
Chrome
What operating system are you using?
macOS
How are you deploying your application?
next build --> AWS Amplify (CloudFront)
Describe the Bug
Let me be honest. I had been using the 9.5.5 version of
next
until a few weeks ago. After checking some outdated packages, I realized and decided to update Next to version 11. However, after doing that, all the images and icons were broken too badly.For the images, after looking over the documentation and GitHub for hours, I figured out the ways with the
next/image
static import. However, the icons are still not fixed and are just totally broken like above.I don't know what I'm supposed to do. One thing to keep in mind is that the icons are broken for both Font Awesome and Nucleo. I know icons are supposed to be called in unique ways for NextJS, but I want to ask why it suddenly doesn't work after updating it to the newer version of NextJS. Could this also be a problem with Webpack 5?
In
_app.js
, I do have imports for CSS forimport "assets/vendor/nucleo/css/nucleo.css"; import "assets/vendor/@fortawesome/fontawesome-free/css/all.min.css";
Expected Behavior
The icons should be displayed perfectly.
To Reproduce
package.json
next.config.js
_app.js