Conversation
XhmikosR
reviewed
Mar 8, 2026
This comment was marked as resolved.
This comment was marked as resolved.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a big one and I had help doing it. Intention here was to eliminate some overhead on our JS side and lean towards the more modern approach of using native ES modules instead of UMD. Every browser, bundler, and Node.js version we support handles ESM natively.
Need to walk through the changes once more before merging. Fixes #31944. Updates a few things to also make things tree shakeable, fixes #37733.
What changed
Entry points:
js/index.umd.jsandjs/index.esm.jsjs/index.jsas the single ESM entry point for all buildsBuild config (
build/rollup.config.mjs):ESMenvironment variable toggle — format is alwaysesmglobalsmap and UMDnameproperty (UMD-only concepts)vanilla-calendar-proto externals list (peer dep, shouldn't be bundled)BUNDLEmode to usespliceinstead of fragilepopfor removing Floating UI from externalsPlugin build (
build/build-plugins.mjs):format: 'umd'toformat: 'esm'globals,name, andclassName— ESM plugins preserve import/export statements as-isexternalto() => truepackage.json:main/modulewith"type": "module"and an"exports"map with subpath exportsjs-compile-standaloneandjs-compile-standalone-esminto one scriptjs-minify-standaloneandjs-minify-standalone-esminto one script.mjs.cjsjspmconfig (UMD-era artifact)@rollup/plugin-commonjsdependency (only needed for UMD plugin imports)filesarrayCJS config files renamed to
.cjs(required by"type": "module"):.babelrc.js→.babelrc.cjsjs/tests/karma.conf.js→js/tests/karma.conf.cjsjs/tests/browsers.js→js/tests/browsers.cjsscss/tests/jasmine.js→scss/tests/jasmine.cjsscss/tests/sass-true/runner.js→scss/tests/sass-true/runner.cjsscss/tests/sass-true/register.js→scss/tests/sass-true/register.cjsIntegration tests:
rollup.bundle.jsandrollup.bundle-modularity.jsas ESM (.mjs)@rollup/plugin-commonjs(no longer needed)bundle.jsto import frombootstrap.jsinstead ofbootstrap.esm.jsbundle-modularity.jsto import ESM plugins with.jsextensionsDocs (
javascript.mdx):bootstrap.esm.*naminges-module-shimspolyfill recommendation (import maps are baseline now)Other:
.bundlewatch.config.json— removed old UMD and.esm.entriesREADME.mddist file listingdist/js/bootstrap.esm.*files