mirror of https://github.com/twbs/bootstrap.git
docs: add Parcel config for Sass deprecation silencing, correct Sass spelling everywhere
This commit is contained in:
parent
59f813b8fb
commit
417073973d
|
@ -109,7 +109,16 @@ With dependencies installed and our project folder ready for us to start coding,
|
|||
}
|
||||
```
|
||||
|
||||
3. **And finally, we can start Parcel.** From the `my-project` folder in your terminal, run that newly added npm script:
|
||||
|
||||
3. ***Optional:*** Sass deprecation warnings are shown when compiling source Sass files with the last versions of Dart Sass. This does not prevent compilation or usage. We are [working on a long-term fix]({{< param repo >}}/issues/40962), in the meantime you can silence these warning by adding the following configuration in a `.sassrc.js` file in the root folder.
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
silenceDeprecations: ['import', 'mixed-decls', 'color-functions', 'global-builtin']
|
||||
}
|
||||
```
|
||||
|
||||
4. **And finally, we can start Parcel.** From the `my-project` folder in your terminal, run that newly added npm script:
|
||||
|
||||
```sh
|
||||
npm start
|
||||
|
|
|
@ -95,7 +95,7 @@ With dependencies installed and our project folder ready for us to start coding,
|
|||
server: {
|
||||
port: 8080
|
||||
},
|
||||
// silencing Sass deprecation warnings, see note below
|
||||
// optional: silencing Sass deprecation warnings, see note below
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
|
@ -111,7 +111,7 @@ With dependencies installed and our project folder ready for us to start coding,
|
|||
}
|
||||
```
|
||||
|
||||
***Note:*** *Sass deprecation warnings are shown when compiling source sass files with the last versions of Dart Sass. This does not prevent compilation or usage. We are [working on a long-term fix]({{< param repo >}}/issues/40962), in the meantime the above config will suppress these warnings.*
|
||||
***Note:*** *Sass deprecation warnings are shown when compiling source Sass files with the last versions of Dart Sass. This does not prevent compilation or usage. We are [working on a long-term fix]({{< param repo >}}/issues/40962), in the meantime the above config will suppress these warnings.*
|
||||
|
||||
|
||||
2. **Next we fill in `src/index.html`.** This is the HTML page Vite will load in the browser to utilize the bundled CSS and JS we'll add to it in later steps.
|
||||
|
|
|
@ -206,7 +206,7 @@ Importing Bootstrap into Webpack requires the loaders we installed in the first
|
|||
loader: 'sass-loader',
|
||||
options: {
|
||||
sassOptions: {
|
||||
// silencing Sass deprecation warnings, see note below
|
||||
// optional: silencing Sass deprecation warnings, see note below
|
||||
silenceDeprecations: [
|
||||
'mixed-decls',
|
||||
'color-functions',
|
||||
|
@ -225,7 +225,7 @@ 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 last versions of Dart Sass. This does not prevent compilation or usage. We are [working on a long-term fix]({{< param repo >}}/issues/40962), in the meantime the above config will suppress these warnings.*
|
||||
***Note:*** *Sass deprecation warnings are shown when compiling source Sass files with the last versions of Dart Sass. This does not prevent compilation or usage. We are [working on a long-term fix]({{< param repo >}}/issues/40962), in the meantime the above config will suppress these warnings.*
|
||||
|
||||
2. **Now, let's import Bootstrap's CSS.** Add the following to `src/scss/styles.scss` to import all of Bootstrap's source Sass.
|
||||
|
||||
|
|
Loading…
Reference in New Issue