{
 "kind": "tool",
 "slug": "webpack",
 "path": "tools/webpack/",
 "name": "webpack",
 "maker": null,
 "density": "profile",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Build tools and bundlers",
   "tools/build-tools/"
  ]
 ],
 "lead": "Module bundler that packages JavaScript, assets and dependencies for browser deployment.",
 "chips": [
  {
   "label": "Build tools and bundlers",
   "path": "tools/build-tools/"
  },
  {
   "label": "NPM"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "npm install webpack"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/webpack/webpack"
  },
  {
   "label": "Website",
   "href": "https://github.com/webpack/webpack"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "MIT",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": null,
   "note": "License from npm.",
   "src": "https://github.com/webpack/webpack"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Nov 23, 2026",
   "note": "Latest GitHub release Nov 19, 2026. ",
   "src": "https://github.com/webpack/webpack"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "53 projects",
   "status": "info",
   "sub": "#18 of 185 in its category",
   "note": "Dependency in 53 public GitHub projects set up for AI coding agents that we scanned (0.8%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Install only",
   "status": "info",
   "sub": null,
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": null
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What webpack does",
   "parts": [
    {
     "t": "prose",
     "text": "Webpack is a bundler that dates to 2012, and it can now take an HTML page as its entry and handle the page, its CSS and its scripts itself, through built-in support the README still calls experimental, while keeping the loader and plugin system it was built around."
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "webpack popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "83",
       "of": "/ 100",
       "l": "Gid Score, #61 overall"
      },
      {
       "n": "76.9M",
       "l": "downloads a week, npm"
      },
      {
       "n": "66K",
       "l": "GitHub stars"
      },
      {
       "n": "53",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How webpack is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "webpack is a dependency in 53 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (1.1% of the 4,867 JavaScript/TypeScript ones), #18 of 185 in build tools and bundlers.",
      "Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 328; those are left out of every share on this page.",
      "The most used alternative in our scan is Vite (1,238 projects).",
      "Projects that use it most often also use webpack CLI (62.3%), ESLint (77.4%), Babel (JavaScript) (35.8%).",
      "It is more common in projects set up for Roo Code (4.5%) than for Claude Code (0.9%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "31 projects, 0.9%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "27 projects, 0.9%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "27 projects, 1.1%",
       "v": "Cursor",
       "path": "agents/cursor/"
      },
      {
       "l": "9 projects, 1.9%",
       "v": "Gemini CLI",
       "path": "agents/gemini-cli/"
      },
      {
       "l": "6 projects, 2.2%",
       "v": "Devin Desktop",
       "path": "agents/devin-desktop/"
      },
      {
       "l": "5 projects, 4.5%",
       "v": "Roo Code",
       "path": "agents/roo-code/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 62.3% of its projects",
       "v": "webpack CLI",
       "path": "tools/webpack-cli/"
      },
      {
       "l": "In 77.4% of its projects",
       "v": "ESLint",
       "path": "tools/eslint/"
      },
      {
       "l": "In 35.8% of its projects",
       "v": "Babel (JavaScript)",
       "path": "tools/babel-npm/"
      },
      {
       "l": "In 35.8% of its projects",
       "v": "ts-loader",
       "path": "tools/ts-loader/"
      },
      {
       "l": "In 30.2% of its projects",
       "v": "Sass",
       "path": "tools/sass/"
      },
      {
       "l": "In 26.4% of its projects",
       "v": "Jest",
       "path": "tools/jest/"
      },
      {
       "l": "In 32.1% of its projects",
       "v": "Testing Library",
       "path": "tools/testing-library/"
      },
      {
       "l": "In 24.5% of its projects",
       "v": "Copy Webpack Plugin",
       "path": "tools/copy-webpack-plugin/"
      }
     ]
    }
   ]
  },
  {
   "id": "profile",
   "nav": "Profile",
   "h2": "webpack in practice",
   "parts": [
    {
     "t": "h3",
     "text": "Strengths"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "An HTML page can be the entry",
       "v": "The website's quick start sets <code>entry</code> to <code>./src/index.html</code>. The site says webpack then bundles what the page references and rewrites the URLs, and adds: \"No loader, no plugin.\""
      },
      {
       "l": "One flag separates debug and deploy builds",
       "v": "The site says <code>--mode production</code> minifies the page, stylesheet and script and drops unused code. It says <code>--mode development</code> leaves output unminified and maps the bundle back to your source in devtools."
      },
      {
       "l": "Loaders turn other files into modules",
       "v": "The README lists TypeScript to JavaScript, Handlebars strings to compiled functions and images to Base64 as examples. It also lists loaders for Sass, Less, PostCSS, Vue and Svelte."
      },
      {
       "l": "Code splitting into async chunks",
       "v": "Output can be a single bundle or several chunks loaded on demand at runtime. The README gives reducing initial loading time as the reason."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Watch out for"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "Native HTML and CSS are experimental",
       "v": "The README calls the built-in HTML and CSS support experimental. It says CSS preprocessors and template engines still need their loaders."
      },
      {
       "l": "Latest patch notes lean on HTML and CSS fixes",
       "v": "In the visible part of the notes for v5.111.1 (2026-09-18), many entries are fixes to HTML parsing and to the HTML and CSS minifiers."
      },
      {
       "l": "Easy config mistakes",
       "v": "The docs warn that rules belong under <code>module.rules</code>, not a top-level <code>rules</code>. They also warn that a regex in <code>test</code> must not be quoted, because a quoted value matches a single file path."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Use an HTML page as the entry"
    },
    {
     "t": "tabs",
     "label": "Example",
     "items": [
      {
       "tab": "Js",
       "code": "export default {\n  entry : \"./src/index.html\" ,\n  output : {\n    // the page loads a `<script type=\"module\">`, so emit ES modules to match\n    module : true ,\n  } ,\n} ;"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "profile",
   "h2": "More about webpack",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Funding",
       "path": "tools/funding/",
       "items": [
        "Open Collective: https://opencollective.com/webpack"
       ]
      },
      {
       "title": "Head to head",
       "items": [
        {
         "text": "esbuild vs webpack",
         "note": "used together in 5 projects",
         "path": "tools/compare/esbuild-vs-webpack/"
        },
        {
         "text": "Vite vs webpack",
         "note": "used together in 13 projects",
         "path": "tools/compare/vite-vs-webpack/"
        }
       ]
      },
      {
       "title": "Packages around it",
       "items": [
        "webpack-cli: Command-line runner",
        "webpack-dev-server: Development server",
        "phaser: HTML5 game framework",
        "html-webpack-plugin: HTML page generation",
        "babel-loader: Babel transpiling loader",
        "@babel: JavaScript compiler"
       ]
      },
      {
       "title": "More in Build tools and bundlers",
       "path": "tools/build-tools/",
       "items": [
        {
         "text": "Turborepo",
         "path": "tools/turbo/"
        },
        {
         "text": "Babel (JavaScript)",
         "path": "tools/babel-npm/"
        },
        {
         "text": "Laravel Vite Plugin",
         "path": "tools/laravel-vite-plugin/"
        },
        {
         "text": "React Compiler Babel Plugin",
         "path": "tools/babel-plugin-react-compiler/"
        },
        {
         "text": "Nx",
         "path": "tools/nx/"
        },
        {
         "text": "vite-tsconfig-paths",
         "path": "tools/vite-tsconfig-paths/"
        },
        {
         "text": "Nx JS Plugin",
         "path": "tools/nx-js/"
        },
        {
         "text": "packaging",
         "path": "tools/packaging/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "webpack",
       "me": true,
       "facts": [
        "MIT",
        "Gid 83",
        "76.9M/wk"
       ]
      },
      {
       "name": "Vite",
       "why": "Fast native-ESM powered web development build tool and dev server.",
       "path": "tools/vite/",
       "facts": [
        "MIT",
        "Gid 92",
        "288M/wk"
       ]
      },
      {
       "name": "esbuild",
       "why": "Extremely fast JavaScript and CSS bundler and minifier written in Go.",
       "path": "tools/esbuild/",
       "facts": [
        "MIT",
        "Gid 85",
        "443M/wk"
       ]
      },
      {
       "name": "SWC",
       "why": "Super-fast Rust-based JavaScript compiler and bundler alternative to Babel.",
       "path": "tools/swc-core/",
       "facts": [
        "Apache-2.0",
        "Gid 78",
        "61.9M/wk"
       ]
      },
      {
       "name": "tsup",
       "why": "Zero-config TypeScript library bundler powered by esbuild.",
       "path": "tools/tsup/",
       "facts": [
        "MIT",
        "Gid 71",
        "13.1M/wk"
       ]
      }
     ],
     "more": "Compare webpack with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "install",
     "intro": "Install it.",
     "code": "npm install webpack"
    },
    {
     "t": "h3",
     "text": "Rules for your agent"
    },
    {
     "t": "rules",
     "label": "Paste into AGENTS.md or CLAUDE.md",
     "text": "## webpack\n- Install `webpack` and `webpack-cli` as dev dependencies. webpack-cli 7 requires Node.js 20.9.0 or later.\n- Put loader rules under `module.rules`, never a top-level `rules`. Write `test` as an unquoted regex like `/\\.js$/`, not a string.\n- With no config file, the entry is `./src/index.js`. If that file is missing, webpack throws `Can't resolve './src'`. Add `webpack.config.js` with an `entry` to use another file.\n- If `package.json` has no `\"type\": \"module\"`, write the config with `require(...)` and `module.exports` instead of `import` and `export default`.\n- Create plugins with `new` inside the `plugins` array, for example `new webpack.ProgressPlugin()`.\n- When the HTML entry loads a `<script type=\"module\">`, set `output.module: true` so webpack emits ES modules.\n- Set `mode` explicitly. It defaults to `production`; use `development` for unminified output with source mapping.\n"
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "npm webpack"
  ],
  [
   "Category",
   "Build tools and bundlers"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "Latest version",
   "v5.111.1, September 18, 2026"
  ],
  [
   "On GitHub since",
   "March 2012"
  ],
  [
   "Gid Score",
   "82.7"
  ],
  [
   "Rank in category",
   "#18 of 185"
  ],
  [
   "GitHub",
   "webpack/webpack"
  ],
  [
   "Last change",
   "Nov 23, 2026"
  ]
 ],
 "good": [],
 "checked_line": "From the package registry, GitHub and our scan of public agent projects; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/webpack.png"
}