Open Spioune opened 1 month ago
Essentially the same root issue as https://github.com/denoland/deno/issues/22736 - but both raise a great point. I found both while trying to find out how to achieve this, which I expected to already exist.
It seems like a great feature for reducing the both the size and security footprint of deno prod installs and compiled binaries, and a somewhat expected one for backwards compatibility with Node libraries/codebases.
I have a npm monorepo:
sveltekit-front only has devDependencies because it is built as a static website deno-server only has "normal" dependencies, no devDependencies. sveltekit-front has the shared package in devDependencies deno-server has the shared package in dependencies
I use docker to deploy both apps.
To create the deno-server docker image: I copy the root package.json, lockfile, apps/deno-server and packages/shared then I run
deno install
inside the root directory (I cannot just rundeno install
inside apps/deno-server because I am in a monorepo, I need the packages/shared symlink)The problem is that
deno install
installs all dependencies, even devDependencies that are not needed for production.Maybe I am missing something. Thanks