How to create NPM package for a React component - (using Webpack + Babel).
Recently I was working on creating a NPM package for a react component. Tried my hands on writing a react radio button component, with webpack and ES6. You can checkout the source code in github repository: https://github.com/tan31989/react-radio-button and the npm repository link is: https://www.npmjs.com/package/react-radio-button . Here is a quick update on the webpack I used for production and deploying the react component as a library so that others can use it: webpack.config.build.js const path = require('path'); const webpack = require('webpack'); module.exports = { entry: [ /** This section is basically the hook for letting the webpack scan your code * to find that right set of files to bundle up for the library you would * want to expose. In my case, the file inside src/components is where * I have the file to be provided as a library. * This section is also known as entry point */ './src/components/Radi...