Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what npm command creates a dist folder in nodejs?

I need to run nodejs project (which is a server of a react app) on a docker container and i cant find a npm command that would create a dist folder to put in the dockerfile. i would very much appreciate any help!

like image 810
Lili Avatar asked Apr 06 '26 21:04

Lili


1 Answers

Usually the dist/ folder is created by the build tool (webpack, vite, parcel, etc). So there's no command that just says "create this directory." If you're using create-react-app then it would be npm run build but I believe CRA is actually outputting to a build/ directory and not dist/.

Really it just depends on what you're wanting to do exactly. Are you looking for a command to build the application for the docker file? Are you looking to just have a path? etc.

like image 179
Matthew H Avatar answered Apr 09 '26 14:04

Matthew H



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!