✅ Intro
Setup
Step 1: Configure dependencies and build setup.
Update the package.json
file with the content below.
Step 2: Build the Library
Run command in the package.json -
npm run build
Command Output
Build output -
dist
Step 3: Install the library from the local package
In the library folder do the following
update the version in the
package.json
npm run build
npm pack
In the App folder, where you need to test the library
npm i <path of the library>/<package-name-version.tgz>
eg:npm add ../design-system-react/design-system-react-1.0.7.tgz
npm start
- start the app
Check the complete code on the GitHub
✅ Intro
I hope you are enjoying this series and learning something useful. Please help me improve my work by providing proper feedback via adding comments or do send me an email.