diff options
| author | XhmikosR <[email protected]> | 2021-09-09 15:01:58 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-09-09 15:01:58 +0300 |
| commit | e961454738f4033eb2be68bde4b257ea9e0a7765 (patch) | |
| tree | 507ca252e706a9c692b133b6e18fb8504c488837 /site/content/docs/5.1/getting-started/webpack.md | |
| parent | 86d5d5ea79e8eaa15a28b9da92bbee53036640f6 (diff) | |
| parent | 1df098361cac04217d6a464c80e890c4335ecb5c (diff) | |
| download | bootstrap-main-xmr-docs-render-heading.tar.xz bootstrap-main-xmr-docs-render-heading.zip | |
Merge branch 'main' into main-xmr-docs-render-headingmain-xmr-docs-render-heading
Diffstat (limited to 'site/content/docs/5.1/getting-started/webpack.md')
| -rw-r--r-- | site/content/docs/5.1/getting-started/webpack.md | 10 |
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 6998e1e99..b87460ebe 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. |
