Ever since updating Next.js to version 12, I've been encountering issues with Bootstrap and SCSS integration.
In my project, I have a global.scss
file that is imported in the _app.js
. Within this file, I include imports for Bootstrap and Bootstrap Icons like so:
@import '~bootstrap/scss/bootstrap.scss';
@import '~bootstrap-icons/font/bootstrap-icons.css';
Previously, everything worked flawlessly. However, post-upgrade to Next.js 12, I started receiving import errors that I'm unsure how to resolve.
./styles/global.scss:5:0
Module not found: Can't resolve '../node_modules/bootstrap/scss/forms/data:image/svg+xml,<svg xmlns='http:/www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke=''
Import trace for requested module:
./styles/global.scss
./pages/_app.jsx
https://nextjs.org/docs/messages/module-not-found