Skip to content

feat(install): added --prod to skip dev deps and @types#33248

Open
bartlomieju wants to merge 1 commit intomainfrom
reland/install-prod-flag
Open

feat(install): added --prod to skip dev deps and @types#33248
bartlomieju wants to merge 1 commit intomainfrom
reland/install-prod-flag

Conversation

@bartlomieju
Copy link
Copy Markdown
Member

Reland of #32863, which was reverted in #33212 to be relanded for Deno v2.8.


  • Added the --prod flag to deno install that skips devDependencies from package.json.
  • Added the --skip-types flag to deno install, only available with --prod. It makes @types/* packages skipped as well from both package.json and deno.json imports. It may be unsafe to use, as only name.starts_with is used to skip @types/ packages, but such packages not guaranteed to have only types actually.
  • When combined with --entrypoint, the module graph is built as "code only" (excludes type-only dependencies).
  • Conflicts with --global and --dev flags.

Closes #26121

- Added the `--prod` flag to `deno install` that skips `devDependencies`
from `package.json`.
- Added the `--skip-types` flag to `deno install`, only available with
`--prod`. It makes `@types/*` packages skipped as well from both
`package.json` and `deno.json` imports. It may be unsafe to use, as only
`name.starts_with` is used to skip `@types/` packages, but such packages
not guaranteed to have only types actually.
- When combined with `--entrypoint`, the module graph is built as "code
only" (excludes type-only dependencies).
- Conflicts with `--global` and `--dev` flags.

## How to use

`deno install --prod --skip-types`
`deno install --prod --entrypoint main.ts`

Closes #26121
@bartlomieju bartlomieju modified the milestones: 3.0, 2.8.0 Apr 12, 2026
@bartlomieju bartlomieju changed the title reland: feat(install): added --prod to skip dev deps and @types feat(install): added --prod to skip dev deps and @types Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deno install --prod

2 participants