]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
clarify importing all vs specific plugins (#34840)
authorMarius A <marius.andreiana@gmail.com>
Mon, 30 Aug 2021 12:36:53 +0000 (15:36 +0300)
committerGitHub <noreply@github.com>
Mon, 30 Aug 2021 12:36:53 +0000 (15:36 +0300)
site/content/docs/5.1/getting-started/webpack.md

index 6998e1e99cdf9cc9ba5827ca0d1dc9c37c66e1ec..b87460ebe10ced2190cd720fb4529b90be1f6022 100644 (file)
@@ -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.