From 4fca7ddd7349f657fccf9c8864fc64f4b1e4e5a6 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Tue, 20 Oct 2020 11:13:42 +0300 Subject: [PATCH] Update optimize.md For some weird reason, using "Exports" as the callout header leads to TypeError coming from clipboard.js --- site/content/docs/5.0/customize/optimize.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/site/content/docs/5.0/customize/optimize.md b/site/content/docs/5.0/customize/optimize.md index a554e3c34f..68d95fa418 100644 --- a/site/content/docs/5.0/customize/optimize.md +++ b/site/content/docs/5.0/customize/optimize.md @@ -40,14 +40,15 @@ import 'bootstrap/js/dist/modal'; 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. {{< callout info >}} -### Exports +### Default Exports Files in `bootstrap/js/dist` use the **default export**, so if you want to use one of them you have to do the following: -{{< highlight js >}} +```js import Modal from 'bootstrap/js/dist/modal' + const modal = new Modal(document.getElementById('myModal')) -{{< /highlight >}} +``` {{< /callout >}} ## Autoprefixer .browserslistrc