I've created a UI library and I created it using some packages like styled-component and react hook form, I can build and publish the library without any problem but when I install it in my main application it says that modules (like styled or react hook form) doesn't exists.
How can I build and publish my npm package with the modules as well? so when installing it in the main app it doesn't look for those modules?
Scripts to build the lib:
rm -rf dist/ && prettier --write src/ && npm run build:esm && npm run build:cjs
Via Active questions tagged javascript - Stack Overflow https://ift.tt/z3NtFJc
Comments
Post a Comment