react-cdk icon indicating copy to clipboard operation
react-cdk copied to clipboard

UMD build capabilities?

Open rohit-ravikoti opened this issue 8 years ago • 2 comments

Hi guys, Thank you so much for this library. It has been very helpful for creating my component. I was wondering how I can go about creating a UMD build which i can host on a CDN.

Thanks again!

rohit-ravikoti avatar Oct 06 '16 20:10 rohit-ravikoti

I ran into a similar issue where I wanted to use react-css-modules and stylus. I ended up creating my own standalone webpack config. https://css-tricks.com/css-modules-part-2-getting-started/ has a decent walkthrough if you're not familiar with webpack.

Once I had a working standalone webpack, I could have just dropped the webpack command line into .scripts/user/prepublish.sh. However, I didn't want the babel result that react-cdk creates. So, I just replaced the prepublish script in package.json with a call to webpack.

IMO, it would be nice if react-cdk performed its prepublish through webpack and allowed us to customize that prepublish step in the same way we currently customize the storybook webpack config.

pward123 avatar Oct 18 '16 20:10 pward123

Hi! @rohit-ravikoti did you find a way to create a UMD package? Perhaps there could use Webpack's Authoring Libraries feature?

@pward123 could you give us details about your suggestion?

usulpro avatar Mar 30 '17 16:03 usulpro