Skip to content

Deprecated @import in Bootstrap SCSS causes issues in modern environments (e.g. Next.js) #41353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ChristianWhoCodes opened this issue Apr 6, 2025 · 1 comment

Comments

@ChristianWhoCodes
Copy link

Bootstrap is still using @import in its .scss files, which is deprecated in Dart Sass and causes issues in modern build systems like Next.js (especially with strict or future Sass modes).

Steps to Reproduce:

  • Use Bootstrap via Sass in a Next.js project.
  • Build the project with strict Sass (or latest versions).

Expected:

  • Bootstrap should use @use and @forward for modular and future-proof compatibility.

Actual:

  • Sass throws deprecation warnings or errors depending on config.

Suggested Fix:

  • Migrate internal Bootstrap SCSS to the modern @use system, as recommended by Sass maintainers

Environment:

  • Next.js 14+
  • Dart Sass
  • Bootstrap version: 5.x.x
@julien-deramond
Copy link
Member

Closing as duplicate of some issues we have already that will be tackled by #41112 and/or #41236

@julien-deramond julien-deramond closed this as not planned Won't fix, can't repro, duplicate, stale Apr 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants