Background
MediaWiki, following Debian package requirements, requires to feature non-minified files for every library. This should also apply to Codex.
@matmarex brought this up:
I've just noticed (while checking out the changes in Codex v0.20.0) that the Codex build in MediaWiki only includes the minified files, but not the unminified ones. A non-minified build should probably be included as well, for reasons documented here: https://www.mediawiki.org/wiki/ResourceLoader/Foreign_resources#Minified_files
You may use minified distribution files provided by the library, but in that case, the corresponding non-minified files must also be downloaded and committed, and they should be used when ResourceLoader debug mode is active. This is because of the requirements for Debian packages, and to improve the developer experience given the lack of support for source maps of external libraries. (related tasks: T217351, T257878, T346075)
(I only added that documentation a few weeks ago, but I think the unwritten recommendation has existed for years)
Would it be feasible to add a non-minified build to Codex, and use it in MediaWiki?
Acceptance Criteria
Update the Codex build configuration to produce the following bundles:
- Minified UMD build (suitable for script-tag inclusion / CDN usage)
- Unminified ESM build (we assume users of this will have their own build tools available)
Unminified CJS build (RL will take care of minification in MW usage)