DEV Community


Posted on

create-react-app component library mode

How, after all these years, does create-react-app not have a "component library" mode?

It's been a huge pain point for a lot of people for a long time

That's why there are a ton of libraries and articles about how to do it, which are drastically different from one another.

All it needs is this
• Full endorsement from the react team
• Use the same webpack configuration as create-react-app
• ...Except the entrypoint needs to NOT have a hash in the js filename

What doesn't work
• Anything built on rollup, because it's not the same configuration
• Anything that's "manual" because it will have to be manually updated by the author when cra updates
• Anything that doesn't have community support because no one new can find it (terrible developer experience)

Top comments (0)