mosaic icon indicating copy to clipboard operation
mosaic copied to clipboard

Add UMD bundle

Open kcarnold opened this issue 1 month ago • 1 comments

I've been trying to help @rpruim make an R package, and one of the challenges that emerged was that some of the runtime environments don't support import(), or need to run offline. See, for example, https://github.com/uwdata/mosaic/pull/929#issuecomment-3495067353

This PR is an attempt at building a self-contained UMD bundle. I don't know if this is even a direction you'd like to go, yet alone whether this approach coheres with your vision of how things should modularize or how the build process should work.

I actually made two different attempts at this; this one has the simpler changes but I've only actually tested my other one: https://github.com/uwdata/mosaic/compare/main...kcarnold:mosaic:add-umd-build?expand=1

Comments welcome.

kcarnold avatar Nov 07 '25 14:11 kcarnold

ESM should be widely supported and adding another build target is going to incur extra maintenance that I would like to avoid. You can of course still build a bundle for your specific application (or once we have the code in here like we do for the js widget). So I'd vote against adding another build type.

domoritz avatar Nov 07 '25 21:11 domoritz

Closing unless we change our stance on supporting UMD going forward.

domoritz avatar Nov 23 '25 20:11 domoritz