Building Design System Package
It is time to create production build of our design system. It should contain only necessary code. We will exclude react from the build. The assumption here is that whoever is consuming design system will be responsible for including react.
In a real project design system should be packaged and published to a npm
repository so the other project can use npm
to get it. However, for this walkthrough, we will build it and keep it in a directory on the disk. Other projects that we build in the next post will consume it from the disk.
Create an entry point for our library; Create ./src/index.js
and add the following content: