platforms
platforms copied to clipboard
NodeJS: no way to use dev-dependencies for build
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/