I'm new to Webpack and to be honest it still confuses me slightly. I would like to create a shareable UI component library from my react build (Using react-starter-kit as it's base). Is there a way to configure my webpack config to output files that I can then import as an NPM module to another project and import the components?
Current setup source folder:
├── /src/ # The source code of the application
│ ├── /components/ # React components
│ │ ├── /ComponentName # Component
│ │ ├── index.js Exports all components
Using the default setup of react starter kit..it's default webpack.config: https://github.com/kriasoft/react-starter-kit/blob/master/tools/webpack.config.js
If I run the build script as /components/index.js as an entry point the resultant script doesn't give me what I need.
Any ideas?