]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
undo the punctuaction changes
authorMark Otto <markdotto@gmail.com>
Thu, 12 Mar 2026 00:16:38 +0000 (17:16 -0700)
committerMark Otto <markdotto@gmail.com>
Thu, 12 Mar 2026 00:16:38 +0000 (17:16 -0700)
site/src/content/docs/guides/npm.mdx
site/src/content/docs/guides/parcel.mdx
site/src/content/docs/guides/vite.mdx
site/src/content/docs/guides/webpack.mdx

index 6de6d095cc4b28719e3cd739822701d85ec0daa7..ff823a7b1c60fe37c9e83f261eaa08e813cc0dcf 100644 (file)
@@ -1,6 +1,6 @@
 ---
 title: Bootstrap and npm
-description: The official guide for how to build a starter project with Bootstrap's CSS and JavaScript in your project using just npm.
+description: The official guide for how to build a starter project with Bootstraps CSS and JavaScript in your project using just npm.
 toc: true
 thumbnail: guides/bootstrap-npm@2x.png
 ---
@@ -17,16 +17,16 @@ thumbnail: guides/bootstrap-npm@2x.png
 
 ## Setup
 
-We're building a npm project with Bootstrap from scratch, so there are some prerequisites and upfront steps before we get started. This guide requires you to have Node.js installed and some familiarity with the terminal.
+Were building a npm project with Bootstrap from scratch, so there are some prerequisites and upfront steps before we get started. This guide requires you to have Node.js installed and some familiarity with the terminal.
 
-1. **Create a project folder and set up npm.** We'll create the `my-project` folder and initialize npm with the `-y` argument to avoid it asking us all the interactive questions.
+1. **Create a project folder and set up npm.** Well create the `my-project` folder and initialize npm with the `-y` argument to avoid it asking us all the interactive questions.
 
    ```sh
    mkdir my-project && cd my-project
    npm init -y
    ```
 
-2. **Install Bootstrap.** Now we can install Bootstrap. We'll also install Floating UI since our dropdowns, popovers, and tooltips depend on it for their positioning. If you don't plan on using those components, you can omit Floating UI here.
+2. **Install Bootstrap.** Now we can install Bootstrap. We’ll also install Floating UI since our dropdowns, popovers, and tooltips depend on it for their positioning. If you don’t plan on using those components, you can omit Floating UI here.
 
    ```sh
    npm i --save bootstrap @floating-ui/dom
@@ -50,14 +50,14 @@ Now that we have all the necessary dependencies installed, we can get to work cr
 
 ## Project structure
 
-We've already created the `my-project` folder and initialized npm. Now we'll also create our `scss` folder, stylesheet, and configuration files to round out the project structure. Run the following from `my-project`, or manually create the folder and file structure shown below.
+We’ve already created the `my-project` folder and initialized npm. Now we’ll also create our `scss` folder, stylesheet, and configuration files to round out the project structure. Run the following from `my-project`, or manually create the folder and file structure shown below.
 
 ```sh
 mkdir {css,scss}
 touch index.html scss/styles.scss postcss.config.js .stylelintrc.json
 ```
 
-When you're done, your project should look like this:
+When youre done, your project should look like this:
 
 ```text
 my-project/
@@ -71,7 +71,7 @@ my-project/
 └── postcss.config.js
 ```
 
-At this point, everything is in the right place, but we'll need to configure our files and add some npm scripts to compile the CSS.
+At this point, everything is in the right place, but well need to configure our files and add some npm scripts to compile the CSS.
 
 ## Configure npm
 
@@ -89,7 +89,7 @@ With dependencies installed and our project folder ready for us to start coding,
    }
    ```
 
-2. **Fill in the `index.html` file.** We need an HTML page to render our project. This page links to the compiled CSS file and includes Bootstrap's pre-built JavaScript bundle.
+2. **Fill in the `index.html` file.** We need an HTML page to render our project. This page links to the compiled CSS file and includes Bootstraps pre-built JavaScript bundle.
 
    ```html
    <!doctype html>
@@ -110,9 +110,9 @@ With dependencies installed and our project folder ready for us to start coding,
    </html>
    ```
 
-   We're including a little bit of Bootstrap styling here with the `div class="container"` and `<button>` so that we see when Bootstrap's CSS is loaded by our npm scripts. Since this setup doesn't use a JavaScript bundler, we load Bootstrap's pre-built JS bundle directly via a `<script>` tag.
+   We’re including a little bit of Bootstrap styling here with the `div class="container"` and `<button>` so that we see when Bootstrap’s CSS is loaded by our npm scripts. Since this setup doesn’t use a JavaScript bundler, we load Bootstrap’s pre-built JS bundle directly via a `<script>` tag.
 
-   *[Read our JavaScript docs]([[docsref:/getting-started/javascript/]]) for more information on how to use Bootstrap's plugins.*
+   *[Read our JavaScript docs]([[docsref:/getting-started/javascript/]]) for more information on how to use Bootstraps plugins.*
 
 3. **Add npm scripts to `package.json`.** Open `package.json` and add the following scripts. We use `sass` to compile our Sass (with `--load-path=node_modules` so it can resolve Bootstrap), `postcss-cli` to apply Autoprefixer, `nodemon` to watch for changes, `npm-run-all` to run scripts in sequence or in parallel, `sirv-cli` to serve our project, and `stylelint` to lint our Sass.
 
@@ -132,7 +132,7 @@ With dependencies installed and our project folder ready for us to start coding,
    }
    ```
 
-4. **Configure `.stylelintrc.json`.** We're using `stylelint-config-twbs-bootstrap` to keep our Sass linting consistent with Bootstrap's own code style.
+4. **Configure `.stylelintrc.json`.** We’re using `stylelint-config-twbs-bootstrap` to keep our Sass linting consistent with Bootstrap’s own code style.
 
    ```json
    {
@@ -148,22 +148,22 @@ With dependencies installed and our project folder ready for us to start coding,
 
    {/* <img class="img-fluid" src="/docs/[[config:docs_version]]/assets/img/guides/npm-dev-server.png" alt="npm dev server running" /> */}
 
-In the next and final section to this guide, we'll import all of Bootstrap's CSS.
+In the next and final section to this guide, we’ll import all of Bootstrap’s CSS.
 
 ## Import Bootstrap
 
 Importing Bootstrap into our project requires adding a Sass import to our `scss/styles.scss` file.
 
-1. **Import Bootstrap's CSS.** Add the following to `scss/styles.scss` to import all of Bootstrap's source Sass. We use the `@use` rule, which is the modern Sass module system.
+1. **Import Bootstrap’s CSS.** Add the following to `scss/styles.scss` to import all of Bootstrap’s source Sass. We use the `@use` rule, which is the modern Sass module system.
 
    ```scss
-   // Import all of Bootstrap's CSS
+   // Import all of Bootstraps CSS
    @use "bootstrap/scss/bootstrap";
    ```
 
    *You can also import our stylesheets individually if you want. [Read our Sass import docs]([[docsref:/customize/sass#importing]]) for details.*
 
-2. **Optionally, customize Bootstrap's Sass tokens.** Since Bootstrap uses Sass modules (`@use`/`@forward`), you can override default values using the `with ()` syntax. You only need to include the keys you want to change — Bootstrap merges your overrides with its defaults.
+2. **Optionally, customize Bootstraps Sass tokens.** Since Bootstrap uses Sass modules (`@use`/`@forward`), you can override default values using the `with ()` syntax. You only need to include the keys you want to change — Bootstrap merges your overrides with its defaults.
 
    ```scss
    @use "bootstrap/scss/bootstrap" with (
@@ -180,10 +180,10 @@ Importing Bootstrap into our project requires adding a Sass import to our `scss/
 
    *[Read our Sass customization docs]([[docsref:/customize/sass#token-defaults]]) for the full list of available token maps and options.*
 
-3. **And you're done! 🎉** With Bootstrap's source Sass fully loaded, your local development server should now look like this:
+3. **And you’re done! 🎉** With Bootstrap’s source Sass fully loaded, your local development server should now look like this:
 
    {/* <img class="img-fluid" src="/docs/[[config:docs_version]]/assets/img/guides/npm-dev-server-bootstrap.png" alt="npm dev server running with Bootstrap" /> */}
 
-   Now you can start adding any Bootstrap components you want to use. Be sure to [check out the complete npm Sass and JS example project](https://github.com/twbs/examples/tree/main/sass-js) for how to include additional custom Sass and optimize your build by importing only the parts of Bootstrap's CSS and JS that you need.
+   Now you can start adding any Bootstrap components you want to use. Be sure to [check out the complete npm Sass and JS example project](https://github.com/twbs/examples/tree/main/sass-js) for how to include additional custom Sass and optimize your build by importing only the parts of Bootstraps CSS and JS that you need.
 
 <GuideFooter />
index 1b51ca94e9259709f4f03c6341e7af42a9116a80..6f90b1d8249438030bbe39be4704a7b8f2670190 100644 (file)
@@ -1,6 +1,6 @@
 ---
 title: Bootstrap and Parcel
-description: The official guide for how to include and bundle Bootstrap's CSS and JavaScript in your project using Parcel.
+description: The official guide for how to include and bundle Bootstraps CSS and JavaScript in your project using Parcel.
 toc: true
 thumbnail: guides/bootstrap-parcel@2x.png
 ---
@@ -8,7 +8,7 @@ thumbnail: guides/bootstrap-parcel@2x.png
 <img class="d-block mx-auto mb-4 img-fluid rounded-3" srcset="/docs/[[config:docs_version]]/assets/img/guides/bootstrap-parcel.png, /docs/[[config:docs_version]]/assets/img/guides/bootstrap-parcel@2x.png 2x" src="/docs/[[config:docs_version]]/assets/img/guides/bootstrap-parcel.png" width="1000" height="500" alt=""/>
 
 <Callout>
-**Want to skip to the end?** Download the source code and working demo for this guide from the [twbs/examples repository](https://github.com/twbs/examples/tree/main/parcel). You can also [open the example in StackBlitz](https://stackblitz.com/github/twbs/examples/tree/main/parcel?file=index.html) but not run it because Parcel isn't currently supported there.
+**Want to skip to the end?** Download the source code and working demo for this guide from the [twbs/examples repository](https://github.com/twbs/examples/tree/main/parcel). You can also [open the example in StackBlitz](https://stackblitz.com/github/twbs/examples/tree/main/parcel?file=index.html) but not run it because Parcel isnt currently supported there.
 </Callout>
 
 ## What is Parcel?
@@ -17,7 +17,7 @@ thumbnail: guides/bootstrap-parcel@2x.png
 
 ## Setup
 
-We're building a Parcel project with Bootstrap from scratch, so there are some prerequisites and upfront steps before we can really get started. This guide requires you to have Node.js installed and some familiarity with the terminal.
+Were building a Parcel project with Bootstrap from scratch, so there are some prerequisites and upfront steps before we can really get started. This guide requires you to have Node.js installed and some familiarity with the terminal.
 
 1. **Create a project folder and set up npm.** We'll create the `my-project` folder and initialize npm with the `-y` argument to avoid it asking us all the interactive questions.
 
@@ -26,13 +26,13 @@ We're building a Parcel project with Bootstrap from scratch, so there are some p
    npm init -y
    ```
 
-2. **Install Parcel.** Unlike our Webpack guide, there's only a single build tool dependency here. Parcel will automatically install language transformers (like Sass) as it detects them. We use `--save-dev` to signal that this dependency is only for development use and not for production.
+2. **Install Parcel.** Unlike our Webpack guide, theres only a single build tool dependency here. Parcel will automatically install language transformers (like Sass) as it detects them. We use `--save-dev` to signal that this dependency is only for development use and not for production.
 
    ```sh
    npm i --save-dev parcel
    ```
 
-3. **Install Bootstrap.** Now we can install Bootstrap. We'll also install Floating UI since our dropdowns, popovers, and tooltips depend on it for their positioning. If you don't plan on using those components, you can omit Floating UI here.
+3. **Install Bootstrap.** Now we can install Bootstrap. We'll also install Floating UI since our dropdowns, popovers, and tooltips depend on it for their positioning. If you dont plan on using those components, you can omit Floating UI here.
 
    ```sh
    npm i --save bootstrap @floating-ui/dom
@@ -42,14 +42,14 @@ Now that we have all the necessary dependencies installed, we can get to work cr
 
 ## Project structure
 
-We've already created the `my-project` folder and initialized npm. Now we'll also create our `src` folder, stylesheet, and JavaScript file to round out the project structure. Run the following from `my-project`, or manually create the folder and file structure shown below.
+Weve already created the `my-project` folder and initialized npm. Now we'll also create our `src` folder, stylesheet, and JavaScript file to round out the project structure. Run the following from `my-project`, or manually create the folder and file structure shown below.
 
 ```sh
 mkdir {src,src/js,src/scss}
 touch src/index.html src/js/main.js src/scss/styles.scss
 ```
 
-When you're done, your complete project should look like this:
+When youre done, your complete project should look like this:
 
 ```text
 my-project/
@@ -90,11 +90,11 @@ With dependencies installed and our project folder ready for us to start coding,
    </html>
    ```
 
-   We're including a little bit of Bootstrap styling here with the `div class="container"` and `<button>` so that we see when Bootstrap's CSS is loaded by Parcel.
+   We’re including a little bit of Bootstrap styling here with the `div class="container"` and `<button>` so that we see when Bootstrap’s CSS is loaded by Parcel.
 
-   Parcel will automatically detect we're using Sass and install the [Sass Parcel plugin](https://parceljs.org/languages/sass/) to support it. However, if you wish, you can also manually run `npm i --save-dev @parcel/transformer-sass`.
+   Parcel will automatically detect were using Sass and install the [Sass Parcel plugin](https://parceljs.org/languages/sass/) to support it. However, if you wish, you can also manually run `npm i --save-dev @parcel/transformer-sass`.
 
-2. **Add the Parcel npm scripts.** Open the `package.json` and add the following `start` script to the `scripts` object. We'll use this script to start our Parcel development server and render the HTML file we created after it's compiled into the `dist` directory.
+2. **Add the Parcel npm scripts.** Open the `package.json` and add the following `start` script to the `scripts` object. We'll use this script to start our Parcel development server and render the HTML file we created after its compiled into the `dist` directory.
 
    ```json
    {
@@ -115,25 +115,25 @@ With dependencies installed and our project folder ready for us to start coding,
 
    <img class="img-fluid" src="/docs/[[config:docs_version]]/assets/img/guides/parcel-dev-server.png" alt="Parcel dev server running" />
 
-In the next and final section to this guide, we'll import all of Bootstrap's CSS and JavaScript.
+In the next and final section to this guide, we'll import all of Bootstraps CSS and JavaScript.
 
 ## Import Bootstrap
 
 Importing Bootstrap into Parcel requires two imports, one into our `styles.scss` and one into our `main.js`.
 
-1. **Import Bootstrap's CSS.** Add the following to `src/scss/styles.scss` to import all of Bootstrap's source Sass.
+1. **Import Bootstrap’s CSS.** Add the following to `src/scss/styles.scss` to import all of Bootstrap’s source Sass.
 
    ```scss
-   // Import all of Bootstrap's CSS
+   // Import all of Bootstraps CSS
    @use "bootstrap/scss/bootstrap";
    ```
 
    *You can also import our stylesheets individually if you want. [Read our Sass import docs]([[docsref:/customize/sass#importing]]) for details.*
 
-2. **Import Bootstrap's JS.** Add the following to `src/js/main.js` to import all of Bootstrap's JS. Floating UI will be imported automatically through Bootstrap.
+2. **Import Bootstrap’s JS.** Add the following to `src/js/main.js` to import all of Bootstrap’s JS. Floating UI will be imported automatically through Bootstrap.
 
    ```js
-   // Import all of Bootstrap's JS
+   // Import all of Bootstraps JS
    import * as bootstrap from 'bootstrap'
    ```
 
@@ -146,12 +146,12 @@ Importing Bootstrap into Parcel requires two imports, one into our `styles.scss`
    import { Tooltip, Toast, Popover } from 'bootstrap'
    ```
 
-   *[Read our JavaScript docs]([[docsref:/getting-started/javascript/]]) for more information on how to use Bootstrap's plugins.*
+   *[Read our JavaScript docs]([[docsref:/getting-started/javascript/]]) for more information on how to use Bootstraps plugins.*
 
-3. **And you're done! 🎉** With Bootstrap's source Sass and JS fully loaded, your local development server should now look like this:
+3. **And you’re done! 🎉** With Bootstrap’s source Sass and JS fully loaded, your local development server should now look like this:
 
    <img class="img-fluid" src="/docs/[[config:docs_version]]/assets/img/guides/parcel-dev-server-bootstrap.png" alt="Parcel dev server running with Bootstrap" />
 
-   Now you can start adding any Bootstrap components you want to use. Be sure to [check out the complete Parcel example project](https://github.com/twbs/examples/tree/main/parcel) for how to include additional custom Sass and optimize your build by importing only the parts of Bootstrap's CSS and JS that you need.
+   Now you can start adding any Bootstrap components you want to use. Be sure to [check out the complete Parcel example project](https://github.com/twbs/examples/tree/main/parcel) for how to include additional custom Sass and optimize your build by importing only the parts of Bootstraps CSS and JS that you need.
 
 <GuideFooter />
index 12513cfd7127c3ea840f4624319ebcbae6e32d88..5bc72b2dd82be35696c23c4415c282107017205d 100644 (file)
@@ -1,6 +1,6 @@
 ---
 title: Bootstrap and Vite
-description: The official guide for how to include and bundle Bootstrap's CSS and JavaScript in your project using Vite.
+description: The official guide for how to include and bundle Bootstraps CSS and JavaScript in your project using Vite.
 toc: true
 thumbnail: guides/bootstrap-vite@2x.png
 ---
@@ -17,7 +17,7 @@ thumbnail: guides/bootstrap-vite@2x.png
 
 ## Setup
 
-We're building a Vite project with Bootstrap from scratch, so there are some prerequisites and upfront steps before we can really get started. This guide requires you to have Node.js installed and some familiarity with the terminal.
+Were building a Vite project with Bootstrap from scratch, so there are some prerequisites and upfront steps before we can really get started. This guide requires you to have Node.js installed and some familiarity with the terminal.
 
 1. **Create a project folder and set up npm.** We'll create the `my-project` folder and initialize npm with the `-y` argument to avoid it asking us all the interactive questions.
 
@@ -26,19 +26,19 @@ We're building a Vite project with Bootstrap from scratch, so there are some pre
    npm init -y
    ```
 
-2. **Install Vite.** Unlike our Webpack guide, there's only a single build tool dependency here. We use `--save-dev` to signal that this dependency is only for development use and not for production.
+2. **Install Vite.** Unlike our Webpack guide, theres only a single build tool dependency here. We use `--save-dev` to signal that this dependency is only for development use and not for production.
 
    ```sh
    npm i --save-dev vite
    ```
 
-3. **Install Bootstrap.** Now we can install Bootstrap. We'll also install Floating UI since our dropdowns, popovers, and tooltips depend on it for their positioning. If you don't plan on using those components, you can omit Floating UI here.
+3. **Install Bootstrap.** Now we can install Bootstrap. We'll also install Floating UI since our dropdowns, popovers, and tooltips depend on it for their positioning. If you dont plan on using those components, you can omit Floating UI here.
 
    ```sh
    npm i --save bootstrap @floating-ui/dom
    ```
 
-4. **Install additional dependency.** In addition to Vite and Bootstrap, we need another dependency (Sass) to properly import and bundle Bootstrap's CSS.
+4. **Install additional dependency.** In addition to Vite and Bootstrap, we need another dependency (Sass) to properly import and bundle Bootstraps CSS.
 
    ```sh
    npm i --save-dev sass
@@ -48,14 +48,14 @@ Now that we have all the necessary dependencies installed and set up, we can get
 
 ## Project structure
 
-We've already created the `my-project` folder and initialized npm. Now we'll also create our `src` folder, stylesheet, and JavaScript file to round out the project structure. Run the following from `my-project`, or manually create the folder and file structure shown below.
+Weve already created the `my-project` folder and initialized npm. Now we'll also create our `src` folder, stylesheet, and JavaScript file to round out the project structure. Run the following from `my-project`, or manually create the folder and file structure shown below.
 
 ```sh
 mkdir {src,src/js,src/scss}
 touch src/index.html src/js/main.js src/scss/styles.scss vite.config.js
 ```
 
-When you're done, your complete project should look like this:
+When youre done, your complete project should look like this:
 
 ```text
 my-project/
@@ -70,13 +70,13 @@ my-project/
 └── vite.config.js
 ```
 
-At this point, everything is in the right place, but Vite won't work because we haven't filled in our `vite.config.js` yet.
+At this point, everything is in the right place, but Vite won’t work because we haven’t filled in our `vite.config.js` yet.
 
 ## Configure Vite
 
 With dependencies installed and our project folder ready for us to start coding, we can now configure Vite and run our project locally.
 
-1. **Open `vite.config.js` in your editor.** Since it's blank, we'll need to add some boilerplate config to it so we can start our server. This part of the config tells Vite where to look for our project's JavaScript and how the development server should behave (pulling from the `src` folder with hot reload).
+1. **Open `vite.config.js` in your editor.** Since it’s blank, we'll need to add some boilerplate config to it so we can start our server. This part of the config tells Vite where to look for our project’s JavaScript and how the development server should behave (pulling from the `src` folder with hot reload).
 
    ```js
    import { resolve } from 'path'
@@ -112,7 +112,7 @@ With dependencies installed and our project folder ready for us to start coding,
    </html>
    ```
 
-   We're including a little bit of Bootstrap styling here with the `div class="container"` and `<button>` so that we see when Bootstrap's CSS is loaded by Vite.
+   We’re including a little bit of Bootstrap styling here with the `div class="container"` and `<button>` so that we see when Bootstrap’s CSS is loaded by Vite.
 
 3. **Now we need an npm script to run Vite.** Open `package.json` and add the `start` script shown below (you should already have the test script). We'll use this script to start our local Vite dev server.
 
@@ -135,26 +135,26 @@ With dependencies installed and our project folder ready for us to start coding,
 
    <img class="img-fluid" src="/docs/[[config:docs_version]]/assets/img/guides/vite-dev-server.png" alt="Vite dev server running" />
 
-In the next and final section to this guide, we'll import all of Bootstrap's CSS and JavaScript.
+In the next and final section to this guide, we’ll import all of Bootstrap’s CSS and JavaScript.
 
 ## Import Bootstrap
 
-1. **Import Bootstrap's CSS.** Add the following to `src/scss/styles.scss` to import all of Bootstrap's source Sass.
+1. **Import Bootstrap’s CSS.** Add the following to `src/scss/styles.scss` to import all of Bootstrap’s source Sass.
 
    ```scss
-   // Import all of Bootstrap's CSS
+   // Import all of Bootstraps CSS
    @use "bootstrap/scss/bootstrap";
    ```
 
    *You can also import our stylesheets individually if you want. [Read our Sass import docs]([[docsref:/customize/sass#importing]]) for details.*
 
-2. **Next we load the CSS and import Bootstrap's JavaScript.** Add the following to `src/js/main.js` to load the CSS and import all of Bootstrap's JS. Floating UI will be imported automatically through Bootstrap.
+2. **Next we load the CSS and import Bootstrap’s JavaScript.** Add the following to `src/js/main.js` to load the CSS and import all of Bootstrap’s JS. Floating UI will be imported automatically through Bootstrap.
 
    ```js
    // Import our custom CSS
    import '../scss/styles.scss'
 
-   // Import all of Bootstrap's JS
+   // Import all of Bootstraps JS
    import * as bootstrap from 'bootstrap'
    ```
 
@@ -167,12 +167,12 @@ In the next and final section to this guide, we'll import all of Bootstrap's CSS
    import { Tooltip, Toast, Popover } from 'bootstrap';
    ```
 
-   *[Read our JavaScript docs]([[docsref:/getting-started/javascript/]]) for more information on how to use Bootstrap's plugins.*
+   *[Read our JavaScript docs]([[docsref:/getting-started/javascript/]]) for more information on how to use Bootstraps plugins.*
 
-3. **And you're done! 🎉** With Bootstrap's source Sass and JS fully loaded, your local development server should now look like this:
+3. **And you’re done! 🎉** With Bootstrap’s source Sass and JS fully loaded, your local development server should now look like this:
 
    <img class="img-fluid" src="/docs/[[config:docs_version]]/assets/img/guides/vite-dev-server-bootstrap.png" alt="Vite dev server running with Bootstrap" />
 
-   Now you can start adding any Bootstrap components you want to use. Be sure to [check out the complete Vite example project](https://github.com/twbs/examples/tree/main/vite) for how to include additional custom Sass and optimize your build by importing only the parts of Bootstrap's CSS and JS that you need.
+   Now you can start adding any Bootstrap components you want to use. Be sure to [check out the complete Vite example project](https://github.com/twbs/examples/tree/main/vite) for how to include additional custom Sass and optimize your build by importing only the parts of Bootstraps CSS and JS that you need.
 
 <GuideFooter />
index 46e231ecb586075c9363a7206c5f69484b6671ef..937d666a65bcaf0190459870ca17fbab46dfe84a 100644 (file)
@@ -1,6 +1,6 @@
 ---
 title: Bootstrap and Webpack
-description: The official guide for how to include and bundle Bootstrap's CSS and JavaScript in your project using Webpack.
+description: The official guide for how to include and bundle Bootstraps CSS and JavaScript in your project using Webpack.
 toc: true
 thumbnail: guides/bootstrap-webpack@2x.png
 ---
@@ -17,7 +17,7 @@ thumbnail: guides/bootstrap-webpack@2x.png
 
 ## Setup
 
-We're building a Webpack project with Bootstrap from scratch, so there are some prerequisites and upfront steps before we can really get started. This guide requires you to have Node.js installed and some familiarity with the terminal.
+Were building a Webpack project with Bootstrap from scratch, so there are some prerequisites and upfront steps before we can really get started. This guide requires you to have Node.js installed and some familiarity with the terminal.
 
 1. **Create a project folder and set up npm.** We'll create the `my-project` folder and initialize npm with the `-y` argument to avoid it asking us all the interactive questions.
 
@@ -32,13 +32,13 @@ We're building a Webpack project with Bootstrap from scratch, so there are some
    npm i --save-dev webpack webpack-cli webpack-dev-server html-webpack-plugin
    ```
 
-3. **Install Bootstrap.** Now we can install Bootstrap. We'll also install Floating UI since our dropdowns, popovers, and tooltips depend on it for their positioning. If you don't plan on using those components, you can omit Floating UI here.
+3. **Install Bootstrap.** Now we can install Bootstrap. We'll also install Floating UI since our dropdowns, popovers, and tooltips depend on it for their positioning. If you dont plan on using those components, you can omit Floating UI here.
 
    ```sh
    npm i --save bootstrap @floating-ui/dom
    ```
 
-4. **Install additional dependencies.** In addition to Webpack and Bootstrap, we need a few more dependencies to properly import and bundle Bootstrap's CSS and JS with Webpack. These include Sass, some loaders, and Autoprefixer.
+4. **Install additional dependencies.** In addition to Webpack and Bootstrap, we need a few more dependencies to properly import and bundle Bootstraps CSS and JS with Webpack. These include Sass, some loaders, and Autoprefixer.
 
    ```sh
    npm i --save-dev autoprefixer css-loader postcss-loader sass sass-loader style-loader
@@ -48,14 +48,14 @@ Now that we have all the necessary dependencies installed, we can get to work cr
 
 ## Project structure
 
-We've already created the `my-project` folder and initialized npm. Now we'll also create our `src` and `dist` folders to round out the project structure. Run the following from `my-project`, or manually create the folder and file structure shown below.
+Weve already created the `my-project` folder and initialized npm. Now we'll also create our `src` and `dist` folders to round out the project structure. Run the following from `my-project`, or manually create the folder and file structure shown below.
 
 ```sh
 mkdir {src,src/js,src/scss}
 touch src/index.html src/js/main.js src/scss/styles.scss webpack.config.js
 ```
 
-When you're done, your complete project should look like this:
+When youre done, your complete project should look like this:
 
 ```text
 my-project/
@@ -70,13 +70,13 @@ my-project/
 └── webpack.config.js
 ```
 
-At this point, everything is in the right place, but Webpack won't work because we haven't filled in our `webpack.config.js` yet.
+At this point, everything is in the right place, but Webpack won’t work because we haven’t filled in our `webpack.config.js` yet.
 
 ## Configure Webpack
 
 With dependencies installed and our project folder ready for us to start coding, we can now configure Webpack and run our project locally.
 
-1. **Open `webpack.config.js` in your editor.** Since it's blank, we'll need to add some boilerplate config to it so we can start our server. This part of the config tells Webpack where to look for our project's JavaScript, where to output the compiled code to (`dist`), and how the development server should behave (pulling from the `dist` folder with hot reload).
+1. **Open `webpack.config.js` in your editor.** Since it’s blank, we'll need to add some boilerplate config to it so we can start our server. This part of the config tells Webpack where to look for our project’s JavaScript, where to output the compiled code to (`dist`), and how the development server should behave (pulling from the `dist` folder with hot reload).
 
    ```js
    'use strict'
@@ -121,7 +121,7 @@ With dependencies installed and our project folder ready for us to start coding,
    </html>
    ```
 
-   We're including a little bit of Bootstrap styling here with the `div class="container"` and `<button>` so that we see when Bootstrap's CSS is loaded by Webpack.
+   We’re including a little bit of Bootstrap styling here with the `div class="container"` and `<button>` so that we see when Bootstrap’s CSS is loaded by Webpack.
 
 3. **Now we need an npm script to run Webpack.** Open `package.json` and add the `start` script shown below (you should already have the test script). We'll use this script to start our local Webpack dev server. You can also add a `build` script shown below to build your project.
 
@@ -145,11 +145,11 @@ With dependencies installed and our project folder ready for us to start coding,
 
    <img class="img-fluid" src="/docs/[[config:docs_version]]/assets/img/guides/webpack-dev-server.png" alt="Webpack dev server running"/>
 
-In the next and final section to this guide, we'll set up the Webpack loaders and import all of Bootstrap's CSS and JavaScript.
+In the next and final section to this guide, we'll set up the Webpack loaders and import all of Bootstraps CSS and JavaScript.
 
 ## Import Bootstrap
 
-Importing Bootstrap into Webpack requires the loaders we installed in the first section. We've installed them with npm, but now Webpack needs to be configured to use them.
+Importing Bootstrap into Webpack requires the loaders we installed in the first section. Weve installed them with npm, but now Webpack needs to be configured to use them.
 
 1. **Set up the loaders in `webpack.config.js`.** Your configuration file is now complete and should match the snippet below. The only new part here is the `module` section.
 
@@ -210,24 +210,24 @@ 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.
+   Heres 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.
 
-2. **Now, let's import Bootstrap's CSS.** Add the following to `src/scss/styles.scss` to import all of Bootstrap's source Sass.
+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
-   // Import all of Bootstrap's CSS
+   // Import all of Bootstraps CSS
    @use "bootstrap/scss/bootstrap";
    ```
 
    *You can also import our stylesheets individually if you want. [Read our Sass import docs]([[docsref:/customize/sass#importing]]) for details.*
 
-3. **Next we load the CSS and import Bootstrap's JavaScript.** Add the following to `src/js/main.js` to load the CSS and import all of Bootstrap's JS. Floating UI will be imported automatically through Bootstrap.
+3. **Next we load the CSS and import Bootstrap’s JavaScript.** Add the following to `src/js/main.js` to load the CSS and import all of Bootstrap’s JS. Floating UI will be imported automatically through Bootstrap.
 
    ```js
    // Import our custom CSS
    import '../scss/styles.scss'
 
-   // Import all of Bootstrap's JS
+   // Import all of Bootstraps JS
    import * as bootstrap from 'bootstrap'
    ```
 
@@ -240,13 +240,13 @@ Importing Bootstrap into Webpack requires the loaders we installed in the first
    import { Tooltip, Toast, Popover } from 'bootstrap'
    ```
 
-   *[Read our JavaScript docs]([[docsref:/getting-started/javascript/]]) for more information on how to use Bootstrap's plugins.*
+   *[Read our JavaScript docs]([[docsref:/getting-started/javascript/]]) for more information on how to use Bootstraps plugins.*
 
-4. **And you're done! 🎉** With Bootstrap's source Sass and JS fully loaded, your local development server should now look like this:
+4. **And you’re done! 🎉** With Bootstrap’s source Sass and JS fully loaded, your local development server should now look like this:
 
    <img class="img-fluid" src="/docs/[[config:docs_version]]/assets/img/guides/webpack-dev-server-bootstrap.png" alt="Webpack dev server running with Bootstrap"/>
 
-   Now you can start adding any Bootstrap components you want to use. Be sure to [check out the complete Webpack example project](https://github.com/twbs/examples/tree/main/webpack) for how to include additional custom Sass and optimize your build by importing only the parts of Bootstrap's CSS and JS that you need.
+   Now you can start adding any Bootstrap components you want to use. Be sure to [check out the complete Webpack example project](https://github.com/twbs/examples/tree/main/webpack) for how to include additional custom Sass and optimize your build by importing only the parts of Bootstraps CSS and JS that you need.
 
 ## Production optimizations
 
@@ -254,7 +254,7 @@ Depending on your setup, you may want to implement some additional security and
 
 ### Extracting CSS
 
-The `style-loader` we configured above conveniently emits CSS into the bundle so that manually loading a CSS file in `dist/index.html` isn't necessary. This approach may not work with a strict Content Security Policy, however, and it may become a bottleneck in your application due to the large bundle size.
+The `style-loader` we configured above conveniently emits CSS into the bundle so that manually loading a CSS file in `dist/index.html` isnt necessary. This approach may not work with a strict Content Security Policy, however, and it may become a bottleneck in your application due to the large bundle size.
 
 To separate the CSS so that we can load it directly from `dist/index.html`, use the `mini-css-extract-loader` Webpack plugin.
 
@@ -316,7 +316,7 @@ After running `npm run build` again, there will be a new file `dist/main.css`, w
 
 ### Extracting SVG files
 
-Bootstrap's CSS includes multiple references to SVG files via inline `data:` URIs. If you define a Content Security Policy for your project that blocks `data:` URIs for images, then these SVG files will not load. You can get around this problem by extracting the inline SVG files using Webpack's asset modules feature.
+Bootstrap’s CSS includes multiple references to SVG files via inline `data:` URIs. If you define a Content Security Policy for your project that blocks `data:` URIs for images, then these SVG files will not load. You can get around this problem by extracting the inline SVG files using Webpack’s asset modules feature.
 
 Configure Webpack to extract inline SVG files like this:
 
@@ -340,6 +340,6 @@ Configure Webpack to extract inline SVG files like this:
          use: [
 ```
 
-After running `npm run build` again, you'll find the SVG files extracted into `dist/icons` and properly referenced from CSS.
+After running `npm run build` again, youll find the SVG files extracted into `dist/icons` and properly referenced from CSS.
 
 <GuideFooter />