Ir al contenido
verdict:

webpack 5.111.0

notable

note: la síntesis y las notas de la versión están en inglés

warning: requiere intervención

1 breaking change5 puntos clave

Removes experiments.outputModule in favor of ESM output.module, and adds output.copy.

síntesis · solo a partir de las notas de la versión · claude-haiku-5-5 · prompt v7

breaking changestodos citados, cada uno con su solución

breaking[1]: experiments.outputModule is removed, and output.module now emits ESM instead.

Remove experiments.outputModule, set output.module to emit ESM instead. (by @alexander-akait in #22011)

help: Stop using experiments.outputModule and set output.module instead.

puntos clave

release-notesgithub.com/webpack/webpack · 145 líneas
  1. ### Minor Changes
  2. - Enable `output.module` by default with `futureDefaults` on ESM-capable targets. (by [@alexander-akait](https://github.com/alexander-akait) in [#22088](https://github.com/webpack/webpack/pull/22088))
  3. - Remove `experiments.outputModule`, set `output.module` to emit ESM instead. (by [@alexander-akait](https://github.com/alexander-akait) in [#22011](https://github.com/webpack/webpack/pull/22011))
  4. - Add `output.copy` to copy files and directories into the output directory. (by [@alexander-akait](https://github.com/alexander-akait) in [#21938](https://github.com/webpack/webpack/pull/21938))
  5. - Accept a file URL in any spelling Node reads where an absolute path is taken. (by [@alexander-akait](https://github.com/alexander-akait) in [#22012](https://github.com/webpack/webpack/pull/22012))
  6. - Minify inline CSS and JSON via `renderEmbeddedSource`, exporting webpack's own. (by [@alexander-akait](https://github.com/alexander-akait) in [#21993](https://github.com/webpack/webpack/pull/21993))
  7. - Export `cssMinify` and `htmlMinify` on `css.syntax` and `html.syntax`. (by [@alexander-akait](https://github.com/alexander-akait) in [#21953](https://github.com/webpack/webpack/pull/21953))
  8. - Make `processResult` async and let a tap rename the asset it rewrote. (by [@alexander-akait](https://github.com/alexander-akait) in [#21854](https://github.com/webpack/webpack/pull/21854))
  9. - Lower a CSS spelling a target cannot read and write a color fallback before one. (by [@alexander-akait](https://github.com/alexander-akait) in [#21926](https://github.com/webpack/webpack/pull/21926))
  10. - Allow optional filesystem cache build dependencies. (by [@xiaoxiaojx](https://github.com/xiaoxiaojx) in [#21849](https://github.com/webpack/webpack/pull/21849))
  11. - Add `output.environment.topLevelAwait` and await every async ESM entry. (by [@alexander-akait](https://github.com/alexander-akait) in [#21915](https://github.com/webpack/webpack/pull/21915))
  12. - Add `unusedSymbols` and `pseudoClasses`, and evaluate a CSS color function. (by [@alexander-akait](https://github.com/alexander-akait) in [#21927](https://github.com/webpack/webpack/pull/21927))
  13. - Drop an implied shorthand slot, fold a math function, tighten color conversion. (by [@alexander-akait](https://github.com/alexander-akait) in [#21929](https://github.com/webpack/webpack/pull/21929))
  14. - Add `module.parser.javascript.specNamespaceObject` for spec namespace objects. (by [@alexander-akait](https://github.com/alexander-akait) in [#22049](https://github.com/webpack/webpack/pull/22049))
  15. - Drop what is already said or only a gone engine reads, add `lowerUnsupported`. (by [@alexander-akait](https://github.com/alexander-akait) in [#21931](https://github.com/webpack/webpack/pull/21931))
  16. - Add `normalizeUrlAttributes`, `mergeScripts`, boolean and token switches. (by [@alexander-akait](https://github.com/alexander-akait) in [#21960](https://github.com/webpack/webpack/pull/21960))
  17. - Minify an event handler attribute, and name the production each script body is. (by [@alexander-akait](https://github.com/alexander-akait) in [#21968](https://github.com/webpack/webpack/pull/21968))
  18. - Add source-map, asset, module, bailout, federation hints; group config checks. (by [@alexander-akait](https://github.com/alexander-akait) in [#21961](https://github.com/webpack/webpack/pull/21961))
  19. - Lower CSS nesting, `:dir()` and custom at-rules; gate case folding and escapes. (by [@alexander-akait](https://github.com/alexander-akait) in [#21950](https://github.com/webpack/webpack/pull/21950))
  20. - Add `optimization.minimize.css.mergeDistantRules` to join rules across a gap. (by [@alexander-akait](https://github.com/alexander-akait) in [#21969](https://github.com/webpack/webpack/pull/21969))
  21. ### Patch Changes
  22. - Minify an embedded body through the embedded path, dropping three html options. (by [@alexander-akait](https://github.com/alexander-akait) in [#21936](https://github.com/webpack/webpack/pull/21936))
  23. - Take a minified `style` attribute's answer whatever quoting it needs. (by [@alexander-akait](https://github.com/alexander-akait) in [#21936](https://github.com/webpack/webpack/pull/21936))
  24. - Name chunk imports in the chunk loader, not at each import site. (by [@alexander-akait](https://github.com/alexander-akait) in [#22076](https://github.com/webpack/webpack/pull/22076))
  25. - Repair hashed names; under HMR bake hashed url maps and reload moved css names. (by [@alexander-akait](https://github.com/alexander-akait) in [#21916](https://github.com/webpack/webpack/pull/21916))
  26. - Enable `output.module` for `module` and `modern-module` library types. (by [@alexander-akait](https://github.com/alexander-akait) in [#22071](https://github.com/webpack/webpack/pull/22071))
  27. - Name an anonymous `export default class` before its static initializers run. (by [@alexander-akait](https://github.com/alexander-akait) in [#21910](https://github.com/webpack/webpack/pull/21910))
  28. - Throw on a non-optional read past an undefined `DefinePlugin` member. (by [@alexander-akait](https://github.com/alexander-akait) in [#22017](https://github.com/webpack/webpack/pull/22017))
  29. - Reject a fulfilled async cycle member with the cycle's evaluation error. (by [@alexander-akait](https://github.com/alexander-akait) in [#21921](https://github.com/webpack/webpack/pull/21921))
  30. - Escape external requests in generated ESM imports and star reexports. (by [@bjohansebas](https://github.com/bjohansebas) in [#22078](https://github.com/webpack/webpack/pull/22078))
  31. - Fix stack overflows in ESM library star reexport cycles with externals. (by [@bjohansebas](https://github.com/bjohansebas) in [#22080](https://github.com/webpack/webpack/pull/22080))
  32. - Preserve live bindings when reexporting external ESM exports. (by [@bjohansebas](https://github.com/bjohansebas) in [#22082](https://github.com/webpack/webpack/pull/22082))
  33. - Use configured external requests in ESM star reexports; reject property paths. (by [@bjohansebas](https://github.com/bjohansebas) in [#22079](https://github.com/webpack/webpack/pull/22079))
  34. - Preserve import attributes on ESM library star reexports of externals. (by [@bjohansebas](https://github.com/bjohansebas) in [#22081](https://github.com/webpack/webpack/pull/22081))
  35. - Fail the build when a runtime module's code generation throws while hashing. (by [@alexander-akait](https://github.com/alexander-akait) in [#22034](https://github.com/webpack/webpack/pull/22034))
  36. - Settle a css chunk load without a DOM where its stylesheet cannot be read. (by [@alexander-akait](https://github.com/alexander-akait) in [#21970](https://github.com/webpack/webpack/pull/21970))
  37. - Await a deferred import's async dependency that is evaluating-async. (by [@alexander-akait](https://github.com/alexander-akait) in [#21934](https://github.com/webpack/webpack/pull/21934))
  38. - Keep a color the CSS minifier would round where its channels are read back. (by [@alexander-akait](https://github.com/alexander-akait) in [#21923](https://github.com/webpack/webpack/pull/21923))
  39. - Refresh a cached module's `resolveOptions` from the factory, not the pack. (by [@hai-x](https://github.com/hai-x) in [#21945](https://github.com/webpack/webpack/pull/21945))
  40. - Read a `<script type>` decoded, so a reference-spelled type is minified. (by [@alexander-akait](https://github.com/alexander-akait) in [#21933](https://github.com/webpack/webpack/pull/21933))
  41. - Read the extension out of a path-scoped rule's alternation, class or braces. (by [@alexander-akait](https://github.com/alexander-akait) in [#21946](https://github.com/webpack/webpack/pull/21946))
  42. - Keep an HTML attribute name or list token holding a foreign template delimiter. (by [@alexander-akait](https://github.com/alexander-akait) in [#22018](https://github.com/webpack/webpack/pull/22018))
  43. - Answer a name a module does not export from the spec namespace. (by [@alexander-akait](https://github.com/alexander-akait) in [#22092](https://github.com/webpack/webpack/pull/22092))
  44. - Give a deferred namespace the spec's exotic shape when the exports are known. (by [@alexander-akait](https://github.com/alexander-akait) in [#21939](https://github.com/webpack/webpack/pull/21939))
  45. - Give a JSON, text or CommonJS namespace the spec's exotic shape and identity. (by [@alexander-akait](https://github.com/alexander-akait) in [#22087](https://github.com/webpack/webpack/pull/22087))
  46. - Report a missing asset instead of a code generation deadlock. (by [@alexander-akait](https://github.com/alexander-akait) in [#21992](https://github.com/webpack/webpack/pull/21992))
  47. - Keep a concatenated CommonJS reference a separate statement, guarding it once. (by [@alexander-akait](https://github.com/alexander-akait) in [#21962](https://github.com/webpack/webpack/pull/21962))
  48. - Keep CSS module exports for a direct loader `importModule()` call. (by [@alexander-akait](https://github.com/alexander-akait) in [#22047](https://github.com/webpack/webpack/pull/22047))
  49. - Fix `import.meta` and `require.main`, and scope-hoist `import.meta.main`. (by [@alexander-akait](https://github.com/alexander-akait) in [#21973](https://github.com/webpack/webpack/pull/21973))
  50. - Honor `resolve.fileSystem` and say where `module.exprContextCritical` moved. (by [@alexander-akait](https://github.com/alexander-akait) in [#22091](https://github.com/webpack/webpack/pull/22091))
  51. - Release stale compilation data from nested children and idle watch builds. (by [@alexander-akait](https://github.com/alexander-akait) in [#22096](https://github.com/webpack/webpack/pull/22096))
  52. - Resolve a `@value` once and then localize it, wherever it names an identifier. (by [@alexander-akait](https://github.com/alexander-akait) in [#22036](https://github.com/webpack/webpack/pull/22036))
  53. - Release the printed-text store's text when the CSS printer drops it. (by [@alexander-akait](https://github.com/alexander-akait) in [#21958](https://github.com/webpack/webpack/pull/21958))
  54. - Skip a foreign dependency whose `isLazy` is a flag when walking a lazy barrel. (by [@alexander-akait](https://github.com/alexander-akait) in [#21998](https://github.com/webpack/webpack/pull/21998))
  55. - Move diagnostics to `buildInfo.diagnostics`, persisting parse-time bailouts. (by [@hai-x](https://github.com/hai-x) in [#22055](https://github.com/webpack/webpack/pull/22055))
  56. - Invalidate consumer codegen when an inlined export value changes. (by [@xiaoxiaojx](https://github.com/xiaoxiaojx) in [#22020](https://github.com/webpack/webpack/pull/22020))
  57. - Rebuild DelegatedModule when DLL manifest metadata changes. (by [@xiaoxiaojx](https://github.com/xiaoxiaojx) in [#22028](https://github.com/webpack/webpack/pull/22028))
  58. - Keep a CSS layer's blocks in order where one of them streams. (by [@alexander-akait](https://github.com/alexander-akait) in [#22044](https://github.com/webpack/webpack/pull/22044))
  59. - Refuse inlining const exports across sync cycles with binding reads. (by [@xiaoxiaojx](https://github.com/xiaoxiaojx) in [#22085](https://github.com/webpack/webpack/pull/22085))
  60. - Escape a text run ending in `</`, which the tag after it made a comment of. (by [@aryanraj45](https://github.com/aryanraj45) in [#22086](https://github.com/webpack/webpack/pull/22086))
  61. - Skip JS render sentinel scans on chunks without HTML. (by [@xiaoxiaojx](https://github.com/xiaoxiaojx) in [#21974](https://github.com/webpack/webpack/pull/21974))
  62. - Minify an attribute by what its value says, not by how the source spelled it. (by [@aryanraj45](https://github.com/aryanraj45) in [#22095](https://github.com/webpack/webpack/pull/22095))
  63. - Cut allocation and scanning in the CSS and HTML printers, output unchanged. (by [@alexander-akait](https://github.com/alexander-akait) in [#21997](https://github.com/webpack/webpack/pull/21997))
  64. - Emit less chunk-loading runtime. (by [@alexander-akait](https://github.com/alexander-akait) in [#22094](https://github.com/webpack/webpack/pull/22094))
  65. - Recognize the reflected attributes of `frame`, `frameset`, `marquee` and `dir`. (by [@alexander-akait](https://github.com/alexander-akait) in [#22003](https://github.com/webpack/webpack/pull/22003))
  66. - Drop the `neo-async` dependency in favor of a faster built-in async helper. (by [@alexander-akait](https://github.com/alexander-akait) in [#21959](https://github.com/webpack/webpack/pull/21959))
  67. - Speed up cache serialization by cutting per-object lookups and call frames. (by [@alexander-akait](https://github.com/alexander-akait) in [#21994](https://github.com/webpack/webpack/pull/21994))
  68. - Update dependencies and match the `ReadFileSync` type to Node.js typings. (by [@dependabot](https://github.com/apps/dependabot) in [#21919](https://github.com/webpack/webpack/pull/21919))
  69. - Match acorn on `**` arrows, LS/PS cooking, string export names, `program` reuse. (by [@alexander-akait](https://github.com/alexander-akait) in [#21666](https://github.com/webpack/webpack/pull/21666))
  70. - Parse a regexp literal the running engine cannot build, and keep locations. (by [@alexander-akait](https://github.com/alexander-akait) in [#22009](https://github.com/webpack/webpack/pull/22009))
  71. - Parse without acorn, serialize parse-error locations, trim walker allocations. (by [@alexander-akait](https://github.com/alexander-akait) in [#21667](https://github.com/webpack/webpack/pull/21667))
  72. - Drop the `acorn` dependency in favor of webpack's own JavaScript parser. (by [@alexander-akait](https://github.com/alexander-akait) in [#22042](https://github.com/webpack/webpack/pull/22042))
  73. - Name HTML chunks after their tags' urls, drop the JS copy, type `text/html`. (by [@alexander-akait](https://github.com/alexander-akait) in [#22008](https://github.com/webpack/webpack/pull/22008))

ver en githubimported 2026-09-28 vía npm