# 使用 Homebrew, apt, Nix 安装 webpack

查看 webpack 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:webpack
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install webpack
```

  证据: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install webpack
```

  证据: Debian stable package indexes: webpack from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#webpack-cli
```

  证据: nixpkgs package indexes: pkgs/by-name/we/webpack-cli/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:webpack
- **软件包管理器:** Homebrew
- **版本:** 5.109.2
- **来源摘要:** Bundler for JavaScript and friends
- **主页:** <https://webpack.js.org/>
- **仓库:** <https://github.com/webpack/webpack>
- **最后更新:** 2026-07-29T23:25:51Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- webpack (别名)
- webpack-cli (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 5.109.2
## 项目历史与用法

webpack is a JavaScript module bundler that builds a dependency graph from application entry points and emits static assets for browsers and other targets. It became one of the defining tools of the 2010s front-end build era because it treated JavaScript, CSS, images, and other assets as modules connected by loaders and plugins.

### 项目历史

The public `webpack/webpack` repository was created on March 10, 2012. GitHub's ReadME Project recounts that Tobias Koppers created webpack while working on a master's thesis for web applications, beginning as an optimizer born from practical need and growing through collaboration with users.

webpack's core model is a static dependency graph. The official concepts documentation explains that webpack starts from one or more entry points, follows the modules an application needs, and combines them into bundles. That model fit the rise of CommonJS, AMD, ES modules, transpilation, CSS preprocessors, and single-page applications.

webpack 4, released in February 2018, lowered the barrier for common use by making a configuration file optional for simple bundles while preserving deep configurability. webpack 5 followed on October 10, 2020, with a major release focused on long-term caching, removals of deprecated behavior, new web-platform features, and development-experience improvements.

### 采用历史

webpack spread because it solved several front-end problems at once: bundling JavaScript for browsers, code splitting for on-demand loading, asset processing through loaders, optimization through plugins, and a configurable build pipeline that frameworks could wrap. The ReadME Project characterized it as used by millions of developers around the world.

Its adoption was reinforced by the surrounding loader/plugin ecosystem and by framework tooling that hid or generated webpack configurations. Even as newer tools such as Rollup, Parcel, esbuild, Vite, and Turbopack changed developer expectations, webpack remained significant in long-lived applications, enterprise build systems, and projects relying on its mature plugin surface.

webpack 5's Module Federation gave the project a second adoption story beyond classic bundling. The webpack 5 release notes describe Module Federation as allowing multiple webpack builds to work together at runtime, enabling independently built code to behave like a connected module graph.

### 使用方式

Developers use webpack by defining entry points, output settings, loaders, plugins, and mode-specific behavior, usually in `webpack.config.js` for non-trivial projects. Since webpack 4, simple projects can run without an explicit config, but package maintainers still recognize the config file as the center of serious webpack setups.

Common usage patterns include compiling modern JavaScript and TypeScript for browsers, bundling CSS and images with content hashes, splitting code by route, running development servers with hot updates, and generating optimized production assets. In larger systems, webpack configuration often becomes shared infrastructure owned by platform or build-tooling teams.

### 为什么软件包爱好者会关心

webpack is package-nerd famous because it made `node_modules` and browser delivery collide at industrial scale. Its loader and plugin conventions shaped how npm packages advertise browser entry points, side effects, CSS handling, and asset behavior.

It is also a landmark in build-tool ergonomics: powerful enough to become the default, configurable enough to become notorious, and stable enough that newer tools are often explained by comparing what they simplify or replace from webpack-era workflows.

### 时间线

- 2012-03-10: Public GitHub repository `webpack/webpack` created.
- 2012: Tobias Koppers began webpack while working on a master's thesis for web applications.
- 2018-02: webpack 4 released; configuration became optional for simple bundles.
- 2020-10-10: webpack 5.0.0 released.
- 2020: webpack 5 introduced Module Federation for connecting independently built webpack builds at runtime.
- 2026-07-02: The GitHub API showed continued activity on the `webpack/webpack` repository.

### Related projects

- webpack is commonly discussed alongside Rollup, Parcel, Browserify, esbuild, Vite, Turbopack, Babel, TypeScript, and framework CLIs. Within webpack itself, webpack-cli, loaders, plugins, and Module Federation form much of the practical ecosystem.

### 来源

- <https://api.github.com/repos/webpack/webpack>
- <https://github.com/readme/podcast/masters-thesis-to-webpack>
- <https://github.com/webpack/webpack>
- <https://webpack.js.org/blog/2020-10-10-webpack-5-release/>
- <https://webpack.js.org/concepts/>


## 安全说明

没有找到 webpack 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: webpack.config.js
## 其他软件包管理器记录

- Debian apt - webpack - 5.97.1+dfsg1+~cs11.18.27-3: normalized package name match | Debian stable package indexes: webpack from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Packs CommonJs/AMD modules for the browser | https://github.com/webpack/webpack
- Ubuntu apt - webpack - 5.76.1+dfsg1+~cs17.16.16-1: normalized package name match | Ubuntu 24.04 LTS package indexes: webpack from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Packs CommonJs/AMD modules for the browser | https://github.com/webpack/webpack
- Nix - webpack-cli: installed executable or alias match | nixpkgs package indexes: pkgs/by-name/we/webpack-cli/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/webpack.yml](https://github.com/mxcl/pkgdb/blob/main/combined/webpack.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
