DimiMikadze / create-react-library

React NPM library starter kit based on Facebook's create react app
MIT License
602 stars 60 forks source link

Help me regarding prop-types #46

Closed NomanGul closed 5 years ago

NomanGul commented 5 years ago

Can I use Prop-types as a devDependency and Publish my library on npm??? Would prop-types work as a devDependency in production?

mohsinulhaq commented 5 years ago

prop-types should be a dependency https://github.com/facebook/prop-types/issues/4 dev-dependencies don't get installed when people npm install your library.

If you don't want to ship it, then you could use https://github.com/oliviertassinari/babel-plugin-transform-react-remove-prop-types babel plugin to remove its usage from your build.