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
790 stars 167 forks source link

[BUG] rollup can't build the library with redux-form #28

Open aminin opened 3 years ago

aminin commented 3 years ago

I cant build the library with redux-form.

See the code

Storybook works fine

npm run storybook

but

npm run build

fails with the following error:

Error: 'import' and 'export' may only appear at the top level
HarveyD commented 3 years ago

Try adding react-redux redux redux-form to peerDependencies so that they're not bundled. Then make sure the consuming projects has these peerDependencies.