React-jsonschema-form: [bootstrap-4] No UMD dist for bootstrap-4 theme

Created on 28 Oct 2020  路  5Comments  路  Source: rjsf-team/react-jsonschema-form

Prerequisites

Description

Bootstrap4 theme doesn't allow UMD/AMD use, while core does. As far as I understand, this makes the dist versions built with npm run build impossible to use via RequireJS (bootstrap-4.cjs.production.min.js, bootstrap-4.esm.js).

Steps to Reproduce

  1. run npm install, npm run build as per docs
  2. Include dist files into project
  3. use requirejs.config to include rjsf/rjsf-bs4
  4. see e.g. 'exports' is undefined

Expected behavior

  1. run npm install, npm run build
  2. find umd dist in bootstrap-4 module

Actual behavior

There are no umd files in bootstrap-4 dist -- see https://jsfiddle.net/v7ka24od/1/

Version

v2.4.0

Most helpful comment

would indeed be nice to have this, as I suppose it would also allow using all the themes from various CDNs, which seems impossible so far. :(

ex: https://www.jsdelivr.com/package/npm/@rjsf/material-ui?path=dist

All 5 comments

Updated to add JSFiddle demonstrating the problem: https://jsfiddle.net/v7ka24od/1/

Would someone look into this please?

We would need to modify the tsdx build command to instead also build a umd version: see https://github.com/formium/tsdx#tsdx-build. I'd be happy to review a PR that adds this in for bootstrap-4 and the other packages that have similar issues (material-ui, fluent-ui).

Thanks for the hint @epicfaace - I'm afraid I'm so far removed from typescript/webpack/etc workflows and working environment that this is almost a new technology to me right now (versus using r.js and AMD) - is it an onerous task or a simple config change? (i.e. is it something that someone who knows how that workflow works, could do with small effort; or is it a more fundamental change to the way this library is built?)

I wish I were more up to date with this and could help fix it :(

would indeed be nice to have this, as I suppose it would also allow using all the themes from various CDNs, which seems impossible so far. :(

ex: https://www.jsdelivr.com/package/npm/@rjsf/material-ui?path=dist

Was this page helpful?
0 / 5 - 0 ratings