Agowan
deno install Omit/exclude dev dependencies from package.json
Just an update on this issue, there is two issues on Github that addresses this issue
https://github.com/denoland/deno/issues/26121
https://github.com/denoland/deno/issues/22736
15 replies
deno install Omit/exclude dev dependencies from package.json
@©TriMoon™ thank you for your input.
Regarding my use case and the need to exclude devDependencies: I’m trying to run SvelteKit with Deno 2 (both during bundle and runtime), and since SvelteKit is a compiler rather than a runtime, its dependencies (among others) are not needed in production. Therefore, I want to exclude devDependencies for production and, of course, reduce the size of my Docker image.
I’m not confusing
install
with add
(I do not intend to add new dependencies to my package.json
). I simply want to run an install of all production npm packages (that is omit all dev dependencies) so that I can copy just the needed npm packages over during a multi-stage Docker image build.
(But as you say I use all npm packages during compiling)
Maybe you could bundle the sveltekit with an executable...15 replies
deno install Omit/exclude dev dependencies from package.json
@coty thank you for your input are you referring to this issue: https://github.com/denoland/deno/issues/17248 ?
15 replies