---
title: "Deno 2.4: deno bundle is back"
description: "Deno 2.4 brings back `deno bundle`, now built on esbuild, producing single-file bundles for Deno or browser targets with tree shaking, minification, sourcemaps and npm/JSR dependency support."
url: "https://swe.quest/articles/deno-2-4-deno-bundle-is-back-ed93373e4555da2c"
canonical: "https://deno.com/blog/v2.4"
source: "Deno"
published: "2025-07-02"
difficulty: "medium"
kind: "Release"
reading_minutes: 19
tags: ["javascript","typescript","runtimes","build-systems","developer-tools"]
---

# Deno 2.4: deno bundle is back

A post on [Deno](https://swe.quest/sources/deno.md), published 2025-07-02, 19 min read, Release. Original: [https://deno.com/blog/v2.4](https://deno.com/blog/v2.4)

## Summary

Deno 2.4 brings back \`deno bundle\`, now built on esbuild, producing single-file bundles for Deno or browser targets with tree shaking, minification, sourcemaps and npm/JSR dependency support. Text and bytes imports via import attributes (behind \`--unstable-raw-imports\`) let assets be embedded in bundles and \`deno compile\` binaries. Built-in OpenTelemetry is now stable, and the release adds a \`--preload\` flag, a \`deno update\` command, \`deno run --coverage\`, a \`DENO\_COMPAT=1\` mode for package.json-first projects, and conditional package.json exports. \`--allow-net\` gains subdomain wildcards and CIDR ranges, a new \`--deny-import\` flag blocks specific hosts, and \`Deno.execPath()\` no longer requires read permission, which avoids pushing users toward a blanket \`--allow-read\`.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)
- [TypeScript](https://swe.quest/tags/typescript.md) (Languages)
- [Runtimes & VMs](https://swe.quest/tags/runtimes.md) (Compilers & runtimes)
- [Build systems](https://swe.quest/tags/build-systems.md) (Engineering practices)
- [Developer tools](https://swe.quest/tags/developer-tools.md) (Engineering practices)

## Prerequisites

- JavaScript modules ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- Deno CLI basics ([easy posts on Developer tools](https://swe.quest/tags/developer-tools.md?difficulty=easy))

## Keywords

Deno, Deno 2.4, deno bundle, esbuild, OpenTelemetry, import attributes, JSR, npm

## Related posts

- [Deno 1.34: deno compile supports npm packages](https://swe.quest/articles/deno-1-34-deno-compile-supports-npm-packages-6066648b7bf9ee04.md): Deno · 2023-05-25 · Medium · 6 min read · JavaScript, Runtimes & VMs, Developer tools, TypeScript
  Deno 1.34 lets \`deno compile\` bundle npm packages and their dependencies into a single self-contained executable.
- [Deno 2.3: Improved deno compile, local npm packages, and more](https://swe.quest/articles/deno-2-3-improved-deno-compile-local-npm-packages-and-more-8da91030a8445369.md): Deno · 2025-05-01 · Medium · 11 min read · JavaScript, TypeScript, Runtimes & VMs, Developer tools, Observability
  Deno 2.3 lets deno compile bundle programs that use FFI and Node native add-ons, adds --include/--exclude control over embedded files, and exposes Deno.build.standalone to detect compiled binaries.
- [Deno 2.6: dx is the new npx](https://swe.quest/articles/deno-2-6-dx-is-the-new-npx-58f73c73a151bd8c.md): Deno · 2025-12-10 · Medium · 16 min read · JavaScript, TypeScript, Runtimes & VMs, Supply chain security, Developer tools
  Deno 2.6 adds \`dx\`, an npx equivalent for running npm and JSR package binaries that defaults to full permissions, prompts before download and runs lifecycle scripts.
- [Deno 2.2: OpenTelemetry, Lint Plugins, node:sqlite](https://swe.quest/articles/deno-2-2-opentelemetry-lint-plugins-node-sqlite-9a3401e2c9c180a2.md): Deno · 2025-02-19 · Medium · 17 min read · JavaScript, TypeScript, Observability, Developer tools, Static analysis
  Deno 2.2 adds built-in OpenTelemetry that auto-instruments console.log, Deno.serve and fetch and exports to an OTLP endpoint behind the --unstable-otel flag.
- [Deno 1.42: Better dependency management with JSR](https://swe.quest/articles/deno-1-42-better-dependency-management-with-jsr-c869439ba578c752.md): Deno · 2024-03-28 · Medium · 9 min read · JavaScript, TypeScript, Runtimes & VMs, Build systems, Developer tools
  Deno 1.42 adds first-class JSR support through new \`deno publish\` and \`deno add\` subcommands, which install packages from JSR and npm and write import map entries.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
