Commit Graph

142 Commits

Author SHA1 Message Date
alexander.akait 93743d233a refactor: code 2024-08-02 19:32:31 +03:00
alexander.akait 9943f3506a style: improve style of code 2024-08-02 19:32:14 +03:00
alexander.akait b9d9a5d9ff style: improve style of code 2024-08-02 19:32:14 +03:00
alexander.akait 500ee96dcb style: improve style of code 2024-08-02 19:32:14 +03:00
alexander.akait a592b62686 style: improve style of code 2024-08-02 19:32:14 +03:00
alexander.akait 423e89b2c7 style: improve style of code 2024-08-02 19:32:13 +03:00
alexander.akait ab3e93b19e style: fix 2024-06-11 16:09:50 +03:00
Viktor Szépe 10014b85d4 Fix typos 2024-02-19 16:46:07 +00:00
Nitin Kumar 412ae5425e chore: udpate prettier to v3 2024-01-14 07:11:34 +05:30
YunfeiHe 03fd7dca11 feat: support passing `RegExp` to `splitChunks.chunks` 2023-06-06 11:33:34 +08:00
alexander.akait a27db31048 refactor: types fix 2023-06-05 03:14:09 +03:00
alexander.akait ab47c696a4 refactor(types): more 2023-06-03 20:52:25 +03:00
Tobias Koppers 6e50595cad split chunks `chunks` filter also affects fallbackCacheGroup
add `splitChunks.fallbackCacheGroup.chunks`
2021-11-02 13:23:09 +01:00
Tobias Koppers 3d3c65f50f add splitChunks.minSizeReduction 2021-10-19 12:35:04 +02:00
Tobias Koppers 3fa83c6c77 help v8 hashing the bigint 2021-10-12 09:50:13 +02:00
Tobias Koppers 1ee6f808d3 Revert "track chunk combinations for modules"
This reverts commit 0e13c7dea4.
2021-10-08 15:08:48 +02:00
Tobias Koppers 0e13c7dea4 track chunk combinations for modules
improves caching
improves SplitChunksPlugin
2021-10-07 15:43:27 +02:00
Daniel Diekmeier 093a9bed16
Fix spelling of `dependOn`
The help text suggests using `dependsOn`, but the `s` is a typo.

The correct property is called `dependOn`: https://webpack.js.org/concepts/entry-points/#entrydescription-object
2021-08-24 16:15:17 +02:00
Tobias Koppers 0605b887c9 fix indeterminism with splitChunks.maxSize 2021-08-06 11:55:00 +02:00
Tobias Koppers b0fa9ccada pretty files 2021-05-11 09:31:46 +02:00
Tobias Koppers 2b3489d136 reuseExistingChunk is able to reuse an entry chunk when it's the only selected chunk 2021-01-19 17:08:58 +01:00
Tobias Koppers 35c7801b5e fix bug where cacheGroup index was inverted 2021-01-07 21:47:08 +01:00
Tobias Koppers 3554793b4b fix bug where module size is added multiple times to the split chunk info
fixes #12307
2021-01-07 16:51:08 +01:00
Tobias Koppers 10aa3daede add experiments.layers
add layers to define different module layers
support module layers in stats

add layer support for NormalModules

fixes #11466
2021-01-05 20:50:59 +01:00
highonweb bc1911bf78 Changed name of memorize function to memoize 2020-12-27 03:02:57 +05:30
Tobias Koppers cbcd459d19 fix conflicting real imports and type imports 2020-11-26 10:02:59 +01:00
Tobias Koppers 146670b3bd fix splitChunks error message bug 2020-10-06 11:11:10 +02:00
Tobias Koppers 68f0dbe748 allow plugins to modify the default size types for splitChunks 2020-09-29 14:34:59 +02:00
Tobias Koppers 5807e6c4db when splitChunks entry violates minSize or minRemainingSize retry without offending modules
fixes #11513
2020-09-25 16:16:05 +02:00
Tobias Koppers ea7af1df11 allow to move modules to parent chunks 2020-09-25 10:51:13 +02:00
Tobias Koppers 64ceeabeae fixes #11337 2020-08-19 14:45:55 +02:00
Tobias Koppers 9676693fa3 splitChunks performance improvement 2020-08-14 10:47:37 +02:00
Tobias Koppers e16bdfda6c refactor used exports analysis, hashing, code generation, optimizations
to keep track of runtimes, used exports depending on runtime

modules can have different hashes and generated code depending on runtime
chunks are only considered as equal for MergeDuplicateChunks and SplitChunks when exports used in contained modules are equal
added `optimization.usedExports: "global"` to opt-out from used exports analysis per runtime
added `splitChunks.usedExports` and `splitChunks.cacheGroups[x].usedExports` to enable/disable used exports comparing for modules
`splitChunks.usedExports` defaults to `true` in production
2020-07-27 22:40:44 +02:00
Tobias Koppers 6014ca7e86 splitChunks improvements
add new splitChunks.enforceSizeThreshold option
enforces splitting on certain size (ignoring maxRequests and minRemainingSize)

reduce default for splitChunks.minSize to 20k
set default for splitChunks.enforceSizeThreshold to 50k

fix bug where sorting didn't work for minSize: 0
2020-07-13 10:12:17 +02:00
Tobias Koppers eac7d290ca no need to sort already ordered results 2020-06-22 09:31:03 +02:00
Tobias Koppers 5e87e9bf55 fix too aggressive chunk renaming for maxSize 2020-06-22 09:30:01 +02:00
Tobias Koppers 9d2b79fa83 cache CacheGroup objects 2020-06-22 09:28:21 +02:00
Tobias Koppers b9c50fdb09 fix jsdoc documentations 2020-04-28 19:42:58 +02:00
Tobias Koppers cbb6ee6809 test more test cases for typings and fix typing bug 2020-04-21 09:25:55 +02:00
Mohsen Azimi 7b07a8db66 Upgrade to Prettier 2 2020-03-28 18:20:24 -04:00
evilebottnawi dafa4cd69a chore: setup cspell 2020-03-12 19:51:26 +03:00
Tobias Koppers 6477ca56f8 Split options defaulting in normalization and defaults
Apply defaults after plugins are applied to allow plugins to feature their own defaults.
This allows to make preset plugins.
2020-02-17 19:12:54 +01:00
Tobias Koppers 64675e3093 use output.hashFunction and hashDigest for getKey in SplitChunksPlugin 2020-02-04 09:18:54 +01:00
Tobias Koppers 8399762621 use bigints as chunks key for performance 2020-02-04 09:18:18 +01:00
Tobias Koppers 26d68719a3 cache getKey for splitChunks.maxSize 2020-02-03 11:02:49 +01:00
Tobias Koppers 95297186d5 remove Array.prototype.reduce calls to simplify code 2020-01-20 14:41:39 +01:00
Tobias Koppers c80bae2959 faster cache access of contextify 2020-01-15 11:20:22 +01:00
Tobias Koppers b80174a069 Improve backward-compat for various things
to enable mini-css-extract-plugin
2019-09-26 22:06:54 +02:00
Tobias Koppers 7bde43f47a Merge tag 'v4.40.0' into next
4.40.0
2019-09-13 11:12:26 +02:00
Tobias Koppers 302e8d5e2b add time logging for SplitChunksPlugin 2019-07-26 14:03:18 +02:00