Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius A <marius.andreiana@gmail.com>2021-08-30 15:36:53 +0300
committerGitHub <noreply@github.com>2021-08-30 15:36:53 +0300
commit10fc1fec6ae74ef1d8e9a4bf417bd5db1f2c288e (patch)
tree9865722a842e5ec1c37617f1b903a496cc777ddf
parentc1fc1dbbee7dcda176f54a76479b9e47d9a5b1de (diff)
clarify importing all vs specific plugins (#34840)
-rw-r--r--site/content/docs/5.1/getting-started/webpack.md10
1 files changed, 7 insertions, 3 deletions
diff --git a/site/content/docs/5.1/getting-started/webpack.md b/site/content/docs/5.1/getting-started/webpack.md
index 6998e1e99c..b87460ebe1 100644
--- a/site/content/docs/5.1/getting-started/webpack.md
+++ b/site/content/docs/5.1/getting-started/webpack.md
@@ -15,15 +15,19 @@ toc: true
Import [Bootstrap's JavaScript]({{< docsref "/getting-started/javascript" >}}) by adding this line to your app's entry point (usually `index.js` or `app.js`):
```js
-// You can specify which plugins you need
-import { Tooltip, Toast, Popover } from 'bootstrap';
+import 'bootstrap';
+
+// or get all of the named exports for further usage
+import * as bootstrap from 'bootstrap';
```
Alternatively, if you only need just a few of our plugins, you may **import plugins individually** as needed:
```js
import Alert from 'bootstrap/js/dist/alert';
-...
+
+// or, specify which plugins you need:
+import { Tooltip, Toast, Popover } from 'bootstrap';
```
Bootstrap depends on [Popper](https://popper.js.org/), which is specified in the `peerDependencies` property.