Skip to content

Commit f15da2c

Browse files
committed
update migration
1 parent 047812b commit f15da2c

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

site/src/content/docs/migration.mdx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,31 @@ Bootstrap 6 is a major release with many breaking changes to modernize our codeb
8484
- Removed unused `$alert-bg-scale`, `$alert-border-scale`, and `$alert-color-scale` (replaced by theme tokens)
8585
- Removed unused `$list-group-item-bg-scale` and `$list-group-item-color-scale` (replaced by theme tokens)
8686

87+
### JavaScript
88+
89+
- **Bootstrap's JavaScript is now ESM-only.** We no longer ship UMD bundles. All dist files (`bootstrap.js`, `bootstrap.bundle.js`, and their minified versions) are native ES modules.
90+
- CDN `<script>` tags must add `type="module"`:
91+
```html
92+
<script type="module" src="bootstrap.bundle.min.js"></script>
93+
```
94+
- There is no longer a `bootstrap` global object. Programmatic usage requires an `import`:
95+
```html
96+
<script type="module">
97+
import { Tooltip } from './bootstrap.bundle.min.js'
98+
new Tooltip(document.getElementById('myTooltip'))
99+
</script>
100+
```
101+
- Data attribute APIs (`data-bs-toggle`, `data-bs-dismiss`, etc.) continue to work automatically with no code changes beyond adding `type="module"` to the script tag.
102+
- For bundler users (Webpack, Vite, Parcel, etc.), no changes are needed — `import { Tooltip } from 'bootstrap'` works as before and now supports tree shaking.
103+
- Removed the separate `bootstrap.esm.js` and `bootstrap.esm.min.js` files — `bootstrap.js` is now the ESM entry point.
104+
- Removed `js/index.umd.js` entry point.
105+
- Removed jQuery support and the `js-test-jquery` test target.
106+
- Replaced Popper.js (`@popperjs/core`) with [Floating UI](https://floating-ui.com/) (`@floating-ui/dom`) for dropdown, tooltip, and popover positioning.
107+
- Added [Vanilla Calendar Pro](https://vanilla-calendar.pro/) (`vanilla-calendar-pro`) as a peer dependency for the new Datepicker component.
108+
- Removed the `jspm` configuration from `package.json`.
109+
- Added `"sideEffects": false` to `package.json` to enable tree shaking in bundlers.
110+
- Added `"exports"` map to `package.json` for explicit subpath access to source, dist, and Sass files.
111+
87112
### Reboot
88113

89114
- Relocated heading classes (like `.h1`) and some type classes (`.mark` and `.small`) to Reboot from `_type.scss`. This avoids a dependency in Sass modules and we like to avoid extending selectors in general.

0 commit comments

Comments
 (0)