react-swipeable-views icon indicating copy to clipboard operation
react-swipeable-views copied to clipboard

Support UMD builds

Open dhleong opened this issue 7 years ago • 0 comments

I'm interested in incorporating this component in my Clojurescript project, but unfortunately Clojurescript doesn't seem to play very nicely with ES6-style modules.

  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

An npm script like npm run build:umd would be available that would compile this library into a format that expects React and ReactDOM to be available on the window, and which provides SwipeableViews et al similarly.

Current Behavior

Only npm build is available, which packages in a way that makes inclusion in Clojurescript problematic.

Context

There's a community-run project that packages Javascript libraries in an easily-consumable way for Clojurescript called CLJSJS. An example that works well in my project already is react-virtualized, for which it relies on a special build:umd task which seems to rely on cross-env and rollup. If it were possible to build this component in a similar manner, it should be possible for me to then create a cljsjs package for it that can use the existing cljsjs.react, etc.

I'm currently experimenting with adding webpack to my project and packaging this with react etc., but while it works in local debug mode, I'm encountering problems making it production-ready, and I'd be much happier with a single build system anyway.

I'm not super familiar with most of the build tools this project uses or I would try submit a PR, but hopefully there's a straightforward solution.

Thank you for your time!

dhleong avatar Aug 14 '18 12:08 dhleong