DEV Community

inversemetric
inversemetric

Posted on

2 1

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)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay