JavaScript libraries can also provide an IIFE build.
Nobody has claimed this yet.
- Dominant language
- MDX
- Stars
- 175k
- Forks
- 78.6k
- Avg merge
- 7h 19m
- Merged PRs (30d)
- 35
Description
Prerequisites
- I have searched for duplicate or closed feature requests
- I have read the contributing guidelines
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
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.
Assessment
- Tech stack
- javascript
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100