Change8

v5.103.0

📦 webpackView on GitHub →
11 features🐛 14 fixes🔧 13 symbols

Summary

This 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.

✨ New Features

  • Added DotenvPlugin and top-level dotenv option
  • Added WebpackManifestPlugin
  • Added support for ignoreList option in devtool plugins
  • Allow custom JavaScript parse functions
  • Added support for import.meta.env, import.meta.dirname, and import.meta.filename
  • Added support for import.defer() for statistical paths
  • Added support for import.meta.main
  • Added named exports for JSON modules and restricted named exports for JSON with attributes
  • Added universal target support for __dirname, __filename, and import.meta equivalents
  • Added CSS exportType option (link, text, css-style-sheet)
  • Added support for CSS composes properties

🐛 Bug Fixes

  • Ensure dependOn chunks load before common chunks
  • Fixed namespace import behavior for external requests with specific exports
  • Removed extra runtime code for module libraries and initial CSS chunks
  • Delayed HMR accept dependencies to preserve import attributes
  • Fixed external preset handling for universal targets
  • Fixed identifier of import binding for module externals
  • Fixed mixing of defer import and dynamic default exports
  • Reduced generated output when globalThis is supported
  • Fixed async module loading in defer imports
  • Fixed re-exporting for default imports in systemjs libraries
  • Renamed HarmonyExportDependencyParserPlugin exported id to CompatibilityPlugin tagged id
  • Fixed __dirname and __filename handling for ES modules
  • Renamed nested __webpack_export__ and __webpack_require__ in bundled code
  • Fixed types for webpack function, NormalModule, Multi compiler, and hashDigest

🔧 Affected Symbols

DotenvPluginWebpackManifestPluginimport.meta.envimport.meta.dirnameimport.meta.filenameimport.deferimport.meta.mainHarmonyExportDependencyParserPluginCompatibilityPluginNormalModule__webpack_export____webpack_require__hashDigest