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:
authorPascal Pepe <contact@pascalpepe.fr>2020-06-19 11:34:30 +0300
committerXhmikosR <xhmikosr@gmail.com>2020-10-20 11:17:06 +0300
commit9cc24cf549cd38d0414fd6ae18873c0cca478f74 (patch)
treede7b43e9398be4681f55d680c87374d03decec9f /site/content
parentc85e86353683a6d844826aa2e7e6da990684f227 (diff)
Update docs example on how to optimize JavaScript bundle
Diffstat (limited to 'site/content')
-rw-r--r--site/content/docs/5.0/customize/optimize.md18
1 files changed, 12 insertions, 6 deletions
diff --git a/site/content/docs/5.0/customize/optimize.md b/site/content/docs/5.0/customize/optimize.md
index 646c0e6e48..358fe86b73 100644
--- a/site/content/docs/5.0/customize/optimize.md
+++ b/site/content/docs/5.0/customize/optimize.md
@@ -24,14 +24,20 @@ For instance, assuming you're using your own JavaScript bundler like Webpack or
```js
// Import just what we need
-// If you're importing tooltips or popovers, be sure to include the Popper.js dependency
-// import "../../node_modules/popper.js/dist/popper.min.js";
-
-import "../../node_modules/bootstrap/js/dist/util.js";
-import "../../node_modules/bootstrap/js/dist/modal.js";
+// import "bootstrap/js/dist/alert";
+// import "bootstrap/js/dist/button";
+// import "bootstrap/js/dist/carousel";
+// import "bootstrap/js/dist/collapse";
+// import "bootstrap/js/dist/dropdown";
+import "bootstrap/js/dist/modal";
+// import "bootstrap/js/dist/popover";
+// import "bootstrap/js/dist/scrollspy";
+// import "bootstrap/js/dist/tab";
+// import "bootstrap/js/dist/toast";
+// import "bootstrap/js/dist/tooltip";
```
-This way, you're not including any JavaScript you don't intend to use for components like buttons, carousels, and tooltips.
+This way, you're not including any JavaScript you don't intend to use for components like buttons, carousels, and tooltips. If you're importing dropdowns, tooltips or popovers, be sure to list the Popper.js dependency in your `package.json` file.
## Autoprefixer .browserslistrc