Last active
January 29, 2024 22:07
-
-
Save akolinski/866e9d55f3d1c996485abe74f88ddb13 to your computer and use it in GitHub Desktop.
If you want to include Bootstrap 5 in a modular way using single-line imports, you can do it like this.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="importmap"> | |
{ | |
"imports": { | |
"@popperjs/core": "https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/esm/popper.min.js", | |
"bootstrap": "https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.esm.min.js" | |
} | |
} | |
</script> | |
<script type="module"> | |
import { Alert, Button, Carousel, Collapse, Dropdown, Modal, Popover, ScrollSpy, Tab, Toast, Tooltip } from 'bootstrap'; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment