| ▲ | 8n4vidtmkvmk 5 hours ago | ||||||||||||||||||||||
You can and probably should set up your production builds that way but it's not automatic. It also gets messy if you're building 2 or 3 services simultaneously out of the same node_modules dir. E.g frontend, backend, shared, scripts... | |||||||||||||||||||||||
| ▲ | user43928 5 hours ago | parent [-] | ||||||||||||||||||||||
How would you set that up? Like say you installed only the production dependencies, then you'd be missing the build tools, bundler, etc. One idea would be to use hooks of your bundler to enforce that each module resolved during the production build is declared in the regular dependencies. It would be far from a standard solution though. | |||||||||||||||||||||||
| |||||||||||||||||||||||