Commit Graph

142 Commits

Author SHA1 Message Date
Tobias Koppers 50bb510d65 avoiding v8 deopts 2019-07-10 00:29:20 +02:00
Tobias Koppers b2e7837288 replace Object.assign with object spread 2019-06-19 13:16:05 +02:00
Tobias Koppers fbff5f3c75 allow filename as function at more places
fixes #9296
2019-06-18 22:22:09 +02:00
Tobias Koppers 6cd2f367b8
Merge pull request #9302 from webpack/bugfix/issue-9288
fix chunk name reuse in SplitChunks
2019-06-18 16:50:11 +02:00
Ryan Drew 07dc8330d0 update name-too-long comment to length 109 2019-06-18 10:29:09 -04:00
Ryan Drew 6e16e12007 remove update to 100 line length
This commit removes the update to 100 line length. It's bad
practice to introduce a behavior change like that.
2019-06-18 10:04:14 -04:00
Tobias Koppers e9b8b00b4f fix chunk name reuse in SplitChunks
fixes #9288
2019-06-18 15:26:28 +02:00
Ryan Drew 054c933950 introduce name truncation config option for SplitChunksPlugin 2019-06-15 14:20:48 -04:00
Daniel Ruf bb944d3de6
fix: remove duplicate code blocks in condition and switch-case 2019-06-15 13:31:45 +02:00
Tobias Koppers 0505e177f1 add more types and fix/remove TODOs
change Chunk.files to Set
remove checkContext from IgnorePlugin
remove external flag from ExternalModule
2019-06-14 10:45:56 +02:00
Tobias Koppers 6db94536ad Merge tag 'v4.34.0' into next
4.34.0
2019-06-13 10:51:12 +02:00
Tobias Koppers 01eb9885a5 disable splitChunks.minRemainingSize for multiple selected chunks 2019-06-12 08:58:17 +02:00
Tobias Koppers 2f5bd7a8e3 fix minRemainingSize when multiple chunks are affected
issue: https://github.com/webpack/webpack/issues/8537#issuecomment-499818693
2019-06-11 17:46:36 +02:00
Tobias Koppers 92f8c36ca2 add `minRemainingSize` option for splitChunks to ensure leftover chunks from splitting have a minimum size
defaults to `minSize` of cache group
defaults to global option when not specified
global option defaults to zero in development
2019-05-13 13:10:23 +02:00
Florent Cailhol b12f24d20c Update hook types 2019-05-10 09:52:22 +02:00
Tobias Koppers b66143f706 Merge tag 'v4.30.0' into next
4.30.0
2019-05-09 21:34:28 +02:00
Tobias Koppers 255b3b460d fixes #8908 2019-03-15 12:39:21 +01:00
Tobias Koppers e2e0983f4c remove splitChunks restriction for custom filenames on non-initial chunks
fix bug, which generated incorrect static url mapping for get chunk filename runtime module
optimize generated code for chunk filename (shorter)
2019-02-19 11:16:53 +01:00
Tobias Koppers 180f912493 Merge tag 'v4.29.2' into next
4.29.2
2019-02-06 15:37:11 +01:00
Tobias Koppers b25ff237bb Prettify source code 2019-02-05 10:08:45 +01:00
Tobias Koppers d40f7b2642 cache contextify and pass associatedObjectForCache to all calls 2019-01-19 12:40:00 +01:00
Florent Cailhol b916ff1491 Improve SplitChunksPlugin typings 2018-12-12 10:49:16 +01:00
Florent Cailhol 2a10b12e09 Add maxAsyncSize and maxInitialSize options 2018-12-11 20:47:50 +01:00
Florent Cailhol 5f26040786 Add types to SplitChunksPlugin 2018-12-10 22:09:27 +01:00
Tobias Koppers fe80339d71 use - instead of ~ as default for better compat
fix automaticNameDelimiter in splitChunks
fix test cases
2018-12-07 14:46:49 +01:00
Tobias Koppers 8281667668 improve ids for Long Term Caching
add deterministic chunk ids and make it default
StatsTestCases no longer need to explicitly use natural ids as the defaults are deterministic now too
add concept of id name hints for chunks
add `idHint` option to splitChunks to provide a hint
deduplicated code from different id plugins to IdHelpers
improve behavior of named ids in case of conflicts
remove `name: true` and `automaticNamePrefix` from splitChunks it's not as good as expected
improve named chunk ids to show root modules
2018-12-07 12:26:35 +01:00
Tobias Koppers 387803bf3d re-add accidentally removed type 2018-12-05 20:23:47 +01:00
Tobias Koppers 30a68b20c7 support different size types in SplitChunksPlugin 2018-12-05 20:23:40 +01:00
Tobias Koppers 0cd0291011 Merge tag 'v4.27.1' into next
4.27.1
2018-12-05 20:17:58 +01:00
Tobias Koppers b56727ec83 enforce should not prevent using `minChunks` etc. on cacheGroup
Partial revert "enforce doesn't affect minSize for maxSize"
2018-12-05 19:38:10 +01:00
Tobias Koppers 0ff1a4f8f8 Merge tag 'v4.27.0' into next
4.27.0
2018-12-04 11:02:26 +01:00
Tobias Koppers 3b46b48fa7 enforce doesn't affect minSize for maxSize
enforce now works as documented
emit warning for minSize > maxSize configuration
performance improvements
bugfix when multiple cacheGroups have the same name

fixes #8407
2018-12-03 11:57:33 +01:00
Tobias Koppers fa87116ea1 Merge tag 'v4.26.1' into next
4.26.1
2018-11-29 14:51:27 +01:00
Tobias Koppers fd2133bc5b handle case when minSize > maxSize
fixes #8407
2018-11-23 09:01:53 +01:00
Tobias Koppers 7a43a27eda make Compilation.chunks a Set 2018-09-06 17:04:01 +02:00
Tobias Koppers 8c8719bd4a
Merge pull request #7954 from webpack/feature/split-chunk-type
add moduleType option to cacheGroup to select by module type
2018-09-03 19:13:26 +02:00
Tobias Koppers 41e59235df emit error when splitChunks.name points to existing chunk name 2018-09-03 10:37:43 +02:00
Tobias Koppers b87e93221b add type option to cacheGroup to select by module type 2018-09-03 10:36:24 +02:00
Tobias Koppers 604460da52 move iterable compare code to comparators 2018-08-28 15:10:30 +02:00
Tobias Koppers 02b15a1b46 pass chunkGraph to updateHash instead of moduleGraph
pass chunkGraph to compareModulesById instead of moduleGraph
pass chunkGraph to methods of RuntimeTemplate
use comparators from module at some places
2018-08-28 12:06:53 +02:00
Florent Cailhol 7b02084bc5 Replace Basic and Advanced optimzation hooks by stages 2018-08-16 14:10:51 +02:00
Tobias Koppers 6d5310fbd6 allow multiple entryModules per chunk
allow to specify ChunkGroup to depend on
move entry modules into ChunkGraph
2018-08-15 11:51:16 +02:00
Tobias Koppers 3cf01999b5 add ChunkGraph
move chunk modules and module chunks into the ChunkGraph
remove outdated unit tests
2018-08-14 15:32:13 +02:00
Tobias Koppers f72d36b9cb add support for generics to tooling 2018-08-14 11:20:20 +02:00
Tobias Koppers cf5f1d723c format existing code 2018-07-30 21:29:21 +02:00
Florent Cailhol 29c99b1787 Convert GraphHelpers 2018-07-26 22:43:20 +02:00
Tobias Koppers bc10939096 add types for Module and subclasses
better way to handle "optional" methods
2018-07-25 12:12:17 +02:00
Tobias Koppers 7036ec488b remove the need to rewrite chunk in reasons 2018-07-23 12:20:47 +02:00
Tobias Koppers 1d87734832 remove backward-compat wrapper from splitChunks.cacheGroups argument 2018-07-11 13:08:33 +02:00
Tobias Koppers 3366421f17
Merge pull request #7663 from webpack/feature/automatic-name-prefix
automaticNamePrefix and name merging bugfix
2018-07-10 20:45:52 +02:00
Tobias Koppers 9362a65287 copy chunk reason to maxSize parts 2018-07-10 10:28:06 +02:00
ferhat elmas 271b77d45f all: typo fixes 2018-07-09 22:54:35 +02:00
Tobias Koppers 7fc88cd55f
Merge pull request #7662 from webpack/bugfix/undefined-in-max-size
fixes usage of automaticNameDelimiter in cache groups
2018-07-05 14:42:19 +02:00
Tobias Koppers 9344801fb7 fix wrong priority handling when merging multiple cache groups by name 2018-07-05 14:39:07 +02:00
Tobias Koppers 14968acc00 add automaticNamePrefix option
allow automaticNameDelimiter on cacheGroup level
2018-07-05 14:13:13 +02:00
Tobias Koppers 8e8f1856e9 fixes usage of automaticNameDelimiter in cache groups 2018-07-05 13:19:55 +02:00
Tobias Koppers 64b22c4806 make the cache a WeakMap to not leak memory
fixes #6929
2018-07-05 12:50:51 +02:00
Tobias Koppers fb2c24bf76 add `splitChunks.maxSize` option
add `splitChunks.fallbackCacheGroup`
add `splitChunks.hidePathInfo`
move `contextify` into utils
add some types
2018-07-04 10:45:02 +02:00
Tobias Koppers 994613bc20 fixes #7499 2018-06-19 20:47:48 +02:00
Florent Cailhol 2a9452e51b Add brackets for multiline if/for statements 2018-05-29 15:45:44 +02:00
Tobias Koppers 75db965170 update combination when split fails because of max requests
fixes #7323
2018-05-17 17:44:38 +02:00
Tobias Koppers 09eb3c9de7 fix bug where splitChunks doesn't work 2018-05-07 12:39:03 +02:00
Tobias Koppers 05275e6e8e improve SplitChunksPlugin performance
avoid looping
better complexity for finding possible combinations
avoid creating a chunks array
caching
2018-05-01 10:54:00 +02:00
Tobias Koppers d91caea860 Pretty files for updated prettier version 2018-04-26 20:14:45 +02:00
Tobias Koppers 8d8da4cdff Merge branch 'master' into bump_prettier 2018-03-29 11:48:02 +02:00
Tobias Koppers 0f70fcb99f
Merge pull request #6791 from storybooks/spilt-chunks-selector
Support selector function as optimization.splitChunks.chunks option
2018-03-29 11:40:07 +02:00
Florent Cailhol f1092ad516 Update prettier toolchain 2018-03-26 16:56:10 +02:00
Florent Cailhol 3983803d30 Destructure 'require' to improve readability 2018-03-22 12:05:58 +01:00
Hypnosphi 1e2d8ec295 Handle `typeof option === "function"` case 2018-03-20 22:57:02 +03:00
Hypnosphi 3f8a94f1a1 Extract normalizeChunksFilter helper 2018-03-20 15:18:09 +03:00
Hypnosphi f804ff06be Support selector function as optimization.splitChunks.chunks option 2018-03-18 16:51:06 +03:00
Manuel Bauer 771bf859a6 Added chunkFilenameDelimiter option for SplitChunksPlugin: Fixed test issue 2018-03-12 10:32:46 +01:00
Manuel Bauer bda8d52810 Added chunkFilenameDelimiter option for SplitChunksPlugin: Applied requested changes 2018-03-12 10:07:31 +01:00
Manuel Bauer 085d2885e4 Added chunkFilenameDelimiter option for SplitChunksPlugin: Added tests and fixed code style 2018-03-09 14:27:19 +01:00
Manuel Bauer b803c649ee Added chunkFilenameDelimiter option for SplitChunksPlugin: Fixed parameter 2018-03-09 10:28:21 +01:00
Manuel Bauer 36db321e9c Added chunkFilenameDelimiter option for SplitChunksPlugin 2018-03-09 10:12:23 +01:00
Tobias Koppers 4d68350128 fix bug where modules are put into the wrong chunk
fixes #6696
2018-03-07 15:39:43 +01:00
Tobias Koppers 00f70fc65c
Merge pull request #6645 from zacanger/fix/6644
Fix #6644
2018-03-03 18:00:15 +01:00
Tobias Koppers ecb65aa75a allow to configure filename for splitted chunks
#6598
2018-03-02 10:14:25 +01:00
zacanger 3a41ca4ee2
Fix #6644 2018-03-01 18:25:44 -07:00
Josh Soref 676e74660a spelling: chosen 2018-02-26 02:26:06 +00:00
Tobias Koppers f32bd41c52 fix linting 2018-02-25 02:15:37 +01:00
Tobias Koppers 5238159d21 run prettier on existing code 2018-02-25 02:00:20 +01:00
Florent Cailhol 40ee8c76d2 Use MD4 for hashing 2018-02-22 11:27:11 +01:00
Tobias Koppers 244d27a42d improve way of getting combinations of chunks
we no longer require a complexity limit -> maxComplexity removed
2018-02-17 10:16:32 +01:00
Tobias Koppers 1e73752fb2 improve chunk splitting
by also trying to select combinations of module chunks
(limited by complexity)
fix size ordering (was reversed)
add chunk cound ordering
2018-02-17 07:01:00 +01:00
Tobias Koppers 4dd521f498 fixes #6413 2018-02-05 17:14:31 +01:00
Florent Cailhol 6ebdc6b309 Truncate generated chunk name if too long
Fixes #6426
2018-02-02 09:55:52 +01:00
Tobias Koppers 72f904a34b run splitChunks and runtimeChunk only on main compiliation 2018-01-24 12:00:50 +01:00
Tobias Koppers ea609374f7 split Chunk.isInitial into isOnlyInitial and canBeInitial
remove includeInitial argument of getChunk(Module)Maps
2018-01-22 12:52:28 +01:00
Tobias Koppers b28435eb32 make default cache group explicit
add priority
using cacheGroups doesn't override default cache groups
2018-01-20 13:13:10 +01:00
Tobias Koppers 18ae73dad4 Refactor chunk graph
Chunks are now always in ChunkGroups
ChunkGroups have parents and children, Chunks no longer have this
AsyncDependenciesBlocks point to a ChunkGroup instead of a list of chunks
Entrypoint is now a ChunkGroup (extends from it)
move stuff graph modification methods into GraphHelpers
Change chunk id recording to source-based
Chunks have parents, siblings and children in Stats
rename AutomaticCommonsChunksPlugin to SplitChunksPlugin
add request property to origin (ChunkGroup)
remove moveToParent from AggressiveMergingPlugin
fix issues with AggressiveSplittingPlugin
remove CommonsChunkPlugin
add optimization.runtimeChunk (RuntimeChunkPlugin)
fix a filename bug for initial chunks
remove extract-text-webpack-plugin from test suite
add DebugHash to help debugging hash issues
fix issues with entry modules in different chunk as runtime
redo optimization.splitChunks options
Compilation.entrypoints is now a Map
Compilation.chunkGroups has been added
remove some unittests
update examples
update tests with CommonsChunkPlugin
2018-01-19 19:21:30 +01:00