Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use create-react-app with a local template?

I'm developing a cra template, but I can't seem to figure out how to try it out without publishing it to npm. I don't want to publish it until I'm sure it's working. How can I tell cra to use a local template?

like image 722
S.W. Avatar asked Feb 24 '26 16:02

S.W.


1 Answers

The answer turns out to be to use

--template file:relative-path-to-template.

I was omitting the 'file:' part.

Thanks, Christiaan!

like image 195
S.W. Avatar answered Feb 26 '26 09:02

S.W.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!