DEV Community


Discussion on: Simple guide to create React CRA component, test locally and publish to npm

sergeyzwezdin profile image
Sergey Zwezdin

Couple of comments:
1) Why do you need heavy CRA to publish just a component?
2) “publish:npm” script is not cross-platform, so you are able to run it on Mac, but on Windows it won’t work. It’s not so good for cross-platform teams. So it would be better to use “cross-env” for instance.

sifatul profile image
sifatul Author

Thank you for leaving you feedback.
Answer 1) The intention of this article was to introduce simplest way to publish in npm. Thus I thought about showing how to publish a component from CRA as most of the beginners knows their way around CRA. I will try to write a new post next week on how to do it other way without creating a SPA.

Answer 2) I agree. I will update the post ASAP.

Thank you again.