tsuru / platforms

Official platforms for the tsuru PaaS.
BSD 3-Clause "New" or "Revised" License
76 stars 70 forks source link

NodeJS: no way to use dev-dependencies for build #116

Open rodolfo3 opened 4 years ago

rodolfo3 commented 4 years ago

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/