webpack 4.15.1 → 4.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/hot/dev-server.js +2 -2
  2. package/hot/only-dev-server.js +2 -2
  3. package/hot/poll.js +5 -2
  4. package/hot/signal.js +2 -2
  5. package/lib/AutomaticPrefetchPlugin.js +1 -1
  6. package/lib/Chunk.js +3 -3
  7. package/lib/ChunkGroup.js +1 -1
  8. package/lib/CommentCompilationWarning.js +2 -2
  9. package/lib/CompatibilityPlugin.js +1 -1
  10. package/lib/Compilation.js +7 -4
  11. package/lib/ContextModule.js +20 -1
  12. package/lib/DelegatedModuleFactoryPlugin.js +7 -1
  13. package/lib/Dependency.js +10 -4
  14. package/lib/Entrypoint.js +1 -1
  15. package/lib/EnvironmentPlugin.js +8 -1
  16. package/lib/Generator.js +1 -1
  17. package/lib/HotModuleReplacementPlugin.js +1 -1
  18. package/lib/IgnorePlugin.js +1 -1
  19. package/lib/SingleEntryPlugin.js +6 -1
  20. package/lib/Stats.js +10 -4
  21. package/lib/UseStrictPlugin.js +1 -1
  22. package/lib/WebpackOptionsApply.js +92 -10
  23. package/lib/WebpackOptionsDefaulter.js +20 -6
  24. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +2 -1
  25. package/lib/dependencies/LoaderPlugin.js +18 -1
  26. package/lib/dependencies/SystemPlugin.js +1 -1
  27. package/lib/formatLocation.js +55 -41
  28. package/lib/node/NodeMainTemplatePlugin.js +2 -2
  29. package/lib/node/NodeSourcePlugin.js +1 -1
  30. package/lib/optimize/NaturalChunkOrderPlugin.js +41 -0
  31. package/lib/optimize/OccurrenceChunkOrderPlugin.js +61 -0
  32. package/lib/optimize/OccurrenceModuleOrderPlugin.js +103 -0
  33. package/lib/optimize/OccurrenceOrderPlugin.js +2 -0
  34. package/lib/optimize/SplitChunksPlugin.js +26 -16
  35. package/lib/util/cachedMerge.js +1 -1
  36. package/lib/util/deterministicGrouping.js +1 -1
  37. package/lib/wasm/WasmFinalizeExportsPlugin.js +1 -1
  38. package/lib/web/JsonpMainTemplatePlugin.js +1 -1
  39. package/lib/web/WebEnvironmentPlugin.js +18 -18
  40. package/lib/webpack.js +4 -0
  41. package/lib/webworker/WebWorkerMainTemplatePlugin.js +1 -1
  42. package/package.json +14 -5
  43. package/schemas/WebpackOptions.json +33 -3
  44. package/schemas/plugins/optimize/OccurrenceOrderChunkIdsPlugin.json +10 -0
  45. package/schemas/plugins/optimize/OccurrenceOrderModuleIdsPlugin.json +10 -0
@@ -1529,6 +1529,15 @@
1529
1529
  }
1530
1530
  ]
1531
1531
  },
1532
+ "automaticNameDelimiter": {
1533
+ "description": "Sets the name delimiter for created chunks",
1534
+ "type": "string",
1535
+ "minLength": 1
1536
+ },
1537
+ "automaticNamePrefix": {
1538
+ "description": "Sets the name prefix for created chunks",
1539
+ "type": "string"
1540
+ },
1532
1541
  "filename": {
1533
1542
  "description": "Sets the template for the filename for created chunks (Only works for initial chunks)",
1534
1543
  "type": "string",
@@ -1586,16 +1595,37 @@
1586
1595
  "description": "Reduce size of WASM by changing imports to shorter strings.",
1587
1596
  "type": "boolean"
1588
1597
  },
1598
+ "moduleIds": {
1599
+ "description": "Define the algorithm to choose module ids (natural: numeric ids in order for usage, named: readable ids for better debugging, hashed: short hashes as ids for better long term caching, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin)",
1600
+ "enum": [
1601
+ "natural",
1602
+ "named",
1603
+ "hashed",
1604
+ "size",
1605
+ "total-size",
1606
+ false
1607
+ ]
1608
+ },
1609
+ "chunkIds": {
1610
+ "description": "Define the algorithm to choose chunk ids (named: readable ids for better debugging, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin)",
1611
+ "enum": [
1612
+ "natural",
1613
+ "named",
1614
+ "size",
1615
+ "total-size",
1616
+ false
1617
+ ]
1618
+ },
1589
1619
  "namedModules": {
1590
- "description": "Use readable module identifiers for better debugging",
1620
+ "description": "Use readable module identifiers for better debugging (deprecated, used moduleIds: named instead)",
1591
1621
  "type": "boolean"
1592
1622
  },
1593
1623
  "hashedModuleIds": {
1594
- "description": "Use hashed module id instead module identifiers for better long term caching",
1624
+ "description": "Use hashed module id instead module identifiers for better long term caching (deprecated, used moduleIds: hashed instead)",
1595
1625
  "type": "boolean"
1596
1626
  },
1597
1627
  "namedChunks": {
1598
- "description": "Use readable chunk identifiers for better debugging",
1628
+ "description": "Use readable chunk identifiers for better debugging (deprecated, used chunkIds: named instead)",
1599
1629
  "type": "boolean"
1600
1630
  },
1601
1631
  "portableRecords": {
@@ -0,0 +1,10 @@
1
+ {
2
+ "additionalProperties": false,
3
+ "type": "object",
4
+ "properties": {
5
+ "prioritiseInitial": {
6
+ "description": "Prioritise initial size over total size",
7
+ "type": "boolean"
8
+ }
9
+ }
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "additionalProperties": false,
3
+ "type": "object",
4
+ "properties": {
5
+ "prioritiseInitial": {
6
+ "description": "Prioritise initial size over total size",
7
+ "type": "boolean"
8
+ }
9
+ }
10
+ }