storybook-eol / react-cdk

under development - React Component Development Kit with Storybook
MIT License
576 stars 43 forks source link

UMD build capabilities? #26

Open rohit-ravikoti opened 8 years ago

rohit-ravikoti commented 8 years ago

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!

pward123 commented 8 years ago

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.

usulpro commented 7 years ago

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?