Webpack
Dev ToolsA bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.
Release History
v5.105.3Breaking6 fixes3 featuresThis patch release focuses on bug fixes across context modules, HMR for CSS, entry point generation, and module resolution, while introducing stricter control over asset module side-effect marking via experimental flags.
v5.105.21 fixThis patch release addresses a regression in the WebpackPluginInstance type definition.
v5.105.13 fixesThis patch release focuses on improving compatibility and performance, notably fixing Windows filesystem issues in VirtualUrlPlugin and reverting a change related to `require("node:...")` compatibility.
v5.105.018 fixes7 featuresThis release introduces significant improvements to module resolution, especially around Workers and conditional imports, and adds configuration flexibility for TypeScript paths via the new tsconfig resolver option.
v5.104.12 fixesThis patch release addresses a security vulnerability in the HttpUriPlugin and fixes a runtime calculation bug related to Webpack import keys.
v5.104.08 fixes7 featuresThis release introduces several CSS module enhancements, new digest algorithms, and performance optimizations for dependency sorting and identifier parsing. It also includes critical security fixes for HttpUriPlugin to prevent SSRF and improves the stability of the webpack runtime.
v5.103.014 fixes11 featuresThis release introduces Dotenv and Manifest plugins, expands import.meta support, and adds new CSS export options. It also includes significant bug fixes for CSS modules, HMR, and TypeScript definitions.
v5.102.17 fixes2 featuresThis release focuses on bug fixes for worker imports, SystemJS compatibility, and CSS parsing, while adding support for browserslist environment extensions.
v5.102.0Breaking13 fixes8 featuresThis release stabilizes the topLevelAwait and layers experiments and introduces native support for 'bytes' and 'text' import attributes. It also adds a built-in extractSourceMap option to replace source-map-loader and includes several performance optimizations for snapshots and build dependencies.
v5.101.33 fixesThis release focuses on bug fixes related to async module execution order, unused statement handling, and destructuring assignment logic.
v5.101.23 fixesThis release focuses on bug fixes related to syntax parsing of trailing comments and improved variable handling for createRequire and tagged variables.
v5.101.110 fixes3 featuresThis release focuses on stability improvements for HMR, chunking logic, and ESM exports, while exposing the ModuleFactory class and serialization types for plugin developers.
v5.101.08 fixes3 featuresThis release introduces tree-shaking for ESM external modules and a new deferImport parser option, alongside several fixes for module concatenation and configuration consistency.
v5.100.23 fixesThis release focuses on improving build consistency regarding CSS and module traversal, alongside a performance optimization for the importPhasesPlugin when deferImport is enabled.
v5.100.12 fixesThis release focuses on optimization and compatibility, specifically improving tree-shaking for ignored modules and fixing TypeScript issues in older Node.js environments.
v5.100.07 fixes8 featuresThis release introduces HMR support for ES modules, experimental Defer Module Evaluation, and the VirtualUrlPlugin. It also includes significant fixes for ES module chunk loading, Windows file system interactions, and TypeScript type definitions.
v5.99.99 fixesThis release focuses on bug fixes related to ES module exports, HMR stability, and asset module compatibility with lazy compilation.
v5.99.82 fixesThis release focuses on resolving TypeScript type errors and improving compatibility with the latest Node.js type definitions.
v5.99.74 fixes2 featuresThis release focuses on fixing module library export generation and improving error reporting in stats. It also enhances HMR stability for CSS modules and adds missing JSON schema types.
v5.99.65 fixesThis release focuses on bug fixes for ES module handling, library export plugins, and performance optimizations for dead control flow logic.
v5.99.51 fixThis release addresses a bug in flow control analysis specifically affecting labeled and blockless statements.
v5.99.41 fixThis release includes a bug fix addressing the handling of terminated states within if/else blocks.
v5.99.31 fixThis release addresses a bug involving dead control flow in deeply nested conditional statements.
v5.99.21 fixThis release addresses a bug related to dead control flow in specific exotic scenarios.
v5.99.11 fixThis release focuses on fixing dead control flow logic across various scenarios.
v5.99.014 fixes3 featuresThis release focuses on improving CSS and ESM library handling, fixing runtime errors in webworkers, and adding support for import.meta.url in Workers. It also includes performance optimizations for reference tracking and inline caching.
v5.98.010 fixes1 featureWebpack v5.98.0 introduces support for ignoring require.resolve via magic comments and includes several performance optimizations and bug fixes for CSS, WASM, and Module Federation.
Common Errors
HookWebpackError2 reportsHookWebpackError in webpack usually indicates a problem during one of webpack's lifecycle hooks, often due to incorrect plugin configurations, missing dependencies, or file system access issues. To fix it, carefully review your webpack configuration, particularly loaders and plugins, ensuring they are correctly configured and that all required dependencies are installed; also verify that all file paths referenced in your configuration are valid and accessible.
WebpackInvocationError1 reportThe "WebpackInvocationError", often featuring "Cannot read properties of undefined (reading 'tap')", typically arises from outdated or incompatible versions of webpack plugins or their dependencies. Ensure all webpack-related packages (webpack, webpack-cli, and all plugins) in your `package.json` are compatible and updated to their latest stable versions by running `npm install` or `yarn install` to regenerate your `node_modules` folder. If version conflicts persist, explicitly define compatible versions in your `package.json`.
SyntaxError1 reportA webpack "SyntaxError" often arises from using a loader (like ts-loader) incorrectly for a specific module type (like CommonJS), generating invalid syntax for that module system. To fix this, ensure your webpack configuration uses the correct loader options or test conditions to properly transform the code for the intended module type (e.g., setting `esModuleInterop: true` in `tsconfig.json` or adjusting `module.exports` statements). Also, verify no other loaders are conflicting and misinterpreting compatible code.
UnhandledSchemeError1 reportThe "UnhandledSchemeError" in webpack usually means you're trying to import or require a resource with a protocol (like `node:`) that webpack doesn't know how to handle by default. To fix this, install and configure the `webpack-node-externals` plugin (or equivalent for other protocols) to tell webpack to treat these imports as external dependencies instead of trying to bundle them. Alternatively, use a plugin like `node-stdlib-browser` to polyfill node.js built-in modules for browser environments.
Related Dev Tools Packages
Empowering everyone to build reliable and efficient software.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
Next generation frontend tooling. It's fast!
An extremely fast Python package and project manager, written in Rust.
Rich is a Python library for rich text and beautiful formatting in the terminal.
Subscribe to Updates
Get notified when new versions are released