HarveyD / react-component-library

A project skeleton to get your very own React Component Library up and running using Rollup, Typescript, SASS + Storybook
https://blog.harveydelaney.com/creating-your-own-react-component-library/
MIT License
789 stars 167 forks source link

Module not found: Can't resolve 'styled-components' #22

Closed dreamsparkx closed 4 years ago

dreamsparkx commented 4 years ago

When user runs the build command and import it in the project, it throws an error:

Module not found: Can't resolve 'styled-components'
dreamsparkx commented 4 years ago

Should it be installed as peer dependency @HarveyD ?

dreamsparkx commented 4 years ago

Got it, removed styled-components from external array in rollup config.

HarveyD commented 4 years ago

Hey @dreamsparkx. Yeah can either be included as a peerDependency, or we can bundle styled-components with the Rollup output.

dreamsparkx commented 4 years ago

@HarveyD Thank you very much.