2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-05 16:42:29 +03:00

Docs: add Sass deprecations notices (#41283)

Co-authored-by: Mark Otto <markdotto@gmail.com>
Co-authored-by: Julien Déramond <juderamond@gmail.com>
This commit is contained in:
Maxime Lardenois
2025-04-07 20:23:25 +02:00
committed by GitHub
parent 33bb9911e7
commit 6f10a1edbb
5 changed files with 42 additions and 2 deletions
@@ -203,7 +203,18 @@ Importing Bootstrap into Webpack requires the loaders we installed in the first
},
{
// Loads a SASS/SCSS file and compiles it to CSS
loader: 'sass-loader'
loader: 'sass-loader',
options: {
sassOptions: {
// Optional: Silence Sass deprecation warnings. See note below.
silenceDeprecations: [
'mixed-decls',
'color-functions',
'global-builtin',
'import'
]
}
}
}
]
}
@@ -214,6 +225,8 @@ Importing Bootstrap into Webpack requires the loaders we installed in the first
Here's a recap of why we need all these loaders. `style-loader` injects the CSS into a `<style>` element in the `<head>` of the HTML page, `css-loader` helps with using `@import` and `url()`, `postcss-loader` is required for Autoprefixer, and `sass-loader` allows us to use Sass.
**Note:** Sass deprecation warnings are shown when compiling source Sass files with the latest versions of Dart Sass. This does not prevent compilation or usage of Bootstrap. We're [working on a long-term fix]({{< param repo >}}/issues/40962), but in the meantime these deprecation notices can be ignored.
2. **Now, let's import Bootstrap's CSS.** Add the following to `src/scss/styles.scss` to import all of Bootstrap's source Sass.
```scss