-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
dart-sass 1.80.0+ throwing a lot of deprecations #40962
Comments
This was mentioned in this comment while searching for a solution to the deprecations introduced in version 1.79. Dropping Node Sass will be necessary to fix this issue. In the meantime, a few options for Bootstrap users:
|
@julien-deramond Also for overwriting SASS variables, it is necessary to set the variables like $grid-breakpoints before and then import bootstrap-grid. Since @import is deprecated, how would this work with @use, which needs to be at the start of the code? |
Thanks @julien-deramond and team - as always, I appreciate all the work that's gone into Bootstrap, as well as the guidance on this issue. For anyone looking for a quick starting point for their own
|
This one works for Webpack:
|
I use this config with Webpack and set the sass The {
loader: 'sass-loader',
options: {
// https://github.com/webpack-contrib/sass-loader#sassoptions
sassOptions: {
// If set to true, Sass won’t print warnings that are caused by dependencies (like bootstrap):
// https://sass-lang.com/documentation/js-api/interfaces/options/#quietDeps
quietDeps: true,
silenceDeprecations: ['import'],
},
},
} |
For everyone using Gulp who also wants to temporarily hide these warnings, the silenceDeprecations option also works:
|
If you are using Ruby on Rails with the gem https://github.com/rails/dartsass-rails, you can do: config/initializers/dartsass.rb: Rails.application.config.dartsass.build_options |= ["--silence-deprecation=import"] .sassrc: {
"includePaths": ["node_modules"],
"silenceDeprecations": [
"import"
],
"quietDeps": true
} |
Prerequisites
Describe the issue
dart-sass has deprecated a bunch of things that bootstrap currently uses:
@import
has been deprecated in favor of@use
color
Reduced test cases
Just import bootstrap into project using dart-sass >= 1.80.0
What operating system(s) are you seeing the problem on?
macOS, Linux
What browser(s) are you seeing the problem on?
No response
What version of Bootstrap are you using?
5.3.3
The text was updated successfully, but these errors were encountered: