platforms icon indicating copy to clipboard operation
platforms copied to clipboard

NodeJS: no way to use dev-dependencies for build

Open rodolfo3 opened this issue 4 years ago • 0 comments

The NodeJS platform use dependencies for runtime dependencies and devDependencies for development/testing ones [1]. Build tools, like babel, are not required on final image on production. But tsuru does not install it on build, forcing to move these dependencies and install it all. This increases the final image.

It can be handled using a docker file with multistage build [2].

Isn't possible to add this to the nodejs platform?

[1] - https://docs.npmjs.com/specifying-dependencies-and-devdependencies-in-a-package-json-file [2] - https://docs.docker.com/develop/develop-images/multistage-build/

rodolfo3 avatar Nov 18 '20 20:11 rodolfo3