JavaScript libraries can also provide an IIFE build.

Open
#42,662 5 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Sufiyan-MSA is already working on this.

Since Aug 13, 2026.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
javascript
Domain
build-system

Research direction

Start by reviewing Bootstrap v6's current ESM distribution and the build configuration that produces the mentioned dist files. Determine the scope and design for an optional IIFE output, including how it should be named and validated alongside the existing distributions; the issue does not identify specific files or tests.

Written by the indexing model from the issue text.

Description

build feature js needs-decision v6 v6-revisit
Prerequisites
Proposal

JavaScript libraries can also provide an IIFE build.

I noticed the following statement in the Bootstrap v6 documentation:

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. The plugin APIs themselves are unchanged—only how you load and reference them is different.

I understand that Bootstrap v6 is embracing the modern JavaScript ecosystem and that UMD bundles have been removed by design. However, would it be possible to continue providing an IIFE build as an optional distribution?

For example, bootstrap.js could remain the default ESM build, while an additional file such as bootstrap.iife.js or bootstrap.browser.js could be provided for users who prefer loading Bootstrap directly in the browser without modules or a bundler.

From what I understand, this would only require adding an additional build configuration, allowing users to choose the distribution format that best fits their use case while keeping ESM as the primary and recommended format.

Motivation and context

I also noticed that jQuery v4 promotes ESM as the primary format in its README, while still providing multiple distribution formats for users to choose from. Perhaps Bootstrap could take a similar approach by offering an additional IIFE build alongside the ESM distribution.

Dominant language
MDX
Stars
175k
Forks
78.7k
Avg merge
1d 10h
Merged PRs (30d)
98

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from twbs/bootstrap

All issues in twbs/bootstrap

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.