Commit Graph

62 Commits

Author SHA1 Message Date
Ivan Kopeykin c4762f8ce4 correct error in case of wrong chunk name 2022-07-26 18:11:00 +03:00
成仕伟 1edc17dac4 Merge avaiable modules correctly 2022-02-08 12:35:14 +08:00
Tobias Koppers 9bb5651e6a add `asyncChunks: boolean` option to disable creation of async chunks 2021-11-10 15:04:44 +01:00
Tobias Koppers 9570a12d6b add `chunkLoading: false` support 2021-11-09 19:57:57 +01:00
Tobias Koppers e1aa5abff0 fix case where runtime is empty string 2021-10-06 15:41:23 +02:00
Tobias Koppers 7311f955a8 only capture time when not cached
time is also expensive...
2021-10-06 15:39:21 +02:00
Tobias Koppers 283359261d add mem caching for getBlockModules 2021-10-06 15:39:21 +02:00
Tobias Koppers 1e5abcc51b improve extractBlockModules 2021-10-06 15:39:21 +02:00
Tobias Koppers b0fa9ccada pretty files 2021-05-11 09:31:46 +02:00
Tobias Koppers 027f9bd929 fix too many modules are included in chunks when using chained dependOn 2021-04-30 12:47:59 +02:00
Tobias Koppers 6db9f1f617 build chunk graph with runtime awareness
this avoid including modules that are not used in specific runtimes
add new test suite to test usedExports: "global" too
2020-10-16 11:47:38 +02:00
Tobias Koppers 8e562aa260 fix some nitpicks with active state 2020-10-07 09:36:41 +02:00
Tobias Koppers fcca1d649d analyse source code for side effects
mark the module as side effects free in such cases
allow 3rd state TRANSITIVE_ONLY to be side-effect-free but dependencies should still be included (for mini-css-extract-plugin)
2020-10-06 14:10:29 +02:00
Tobias Koppers 7df6415bcc make sure to generate correct chunk connection for blocks that are only connected in some runtimes
fixes #8677
2020-09-17 10:41:13 +02:00
Tobias Koppers ed06a7f83a new Worker() support
add support for async anonymous entrypoints from inside the codebase
add worker example
move entry options into Entrypoint and receive them from there
2020-09-08 07:37:20 +02:00
Tobias Koppers f9fe121fc8 improve and add statistics 2020-08-14 10:51:12 +02:00
Tobias Koppers 35f9b63518 chunk graph performance optimization 2020-08-14 10:47:35 +02:00
Tobias Koppers 84fd99c5e5 chunk graph performance optimization 2020-08-14 10:47:34 +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 b3466e996b add entry[x].runtime option to allow runtime chunk per entry 2020-07-27 22:40:40 +02:00
Tobias Koppers a468cbbd2e add provide shared module plugin 2020-05-23 16:08:51 +02:00
Tobias Koppers e9ae850d66 support overridables in initial chunks 2020-04-30 00:40:38 +02:00
Tobias Koppers e8389aff46
Merge pull request #10572 from goganchic/refactor/buildChunkGraph
buildChunkGraph code clarification
2020-03-26 16:51:49 +01:00
e.baranov 47cb8e1a28 refactor: clarify comments 2020-03-21 16:23:22 +03:00
e.baranov 1444bce9c9 refactor: rename chunkDependencies to chunkGroupDependencies 2020-03-18 10:54:43 +03:00
evilebottnawi dafa4cd69a chore: setup cspell 2020-03-12 19:51:26 +03:00
Tobias Koppers edecce586b handle dependOn at start of buildChunkGraph
handle jsonp chunk loading correctly for child entrypoints
add error message for incorrect dependOn
2020-02-11 09:12:13 +01:00
Sergey Melyukov c31d941899 dependOn feature
Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2020-02-11 09:11:00 +01:00
Tobias Koppers 16c751ba9b remove unneeded duplicate minAvailableModules check 2020-02-10 15:58:51 +01:00
Tobias Koppers 9cebcfd9fd be more lazy when creating resultingAvailableModules 2020-02-04 09:19:22 +01:00
Tobias Koppers a79f250806 ModuleSetPlus for minAvailableModules 2020-02-04 09:19:20 +01:00
Tobias Koppers 4b7a90f531 ModuleSetPlus for resultingAvailableModules 2020-02-04 09:19:19 +01:00
Tobias Koppers de91b1e916 capture total visitModules time 2020-02-04 09:19:18 +01:00
Tobias Koppers 9a5e3c45eb initialize skippedItems lazy and store modules instead of queue items 2020-01-29 21:33:03 +01:00
Tobias Koppers e66b51b8f7 reuse QueueItem for module leaving 2020-01-29 21:33:01 +01:00
Tobias Koppers bfe55b71a2 make value of queueConnect a Set<ChunkGroupInfo> 2020-01-29 21:32:58 +01:00
Tobias Koppers 35e2e1c97c make key of queueConnect a ChunkGroupInfo 2020-01-29 21:32:56 +01:00
Tobias Koppers abe07cc631 track ChunkGroupInfo in QueueItems, blockChunkGroups and namedChunkGroups 2020-01-29 21:32:54 +01:00
Tobias Koppers 40ef47f151 remove chunkGroupCounters map 2020-01-29 21:32:52 +01:00
Tobias Koppers 1070ce925b remove Array.prototype.reduce calls to simplify code 2020-01-17 18:31:29 +01:00
jamesgeorge007 fbd86e3984 fix: grammar 2020-01-03 11:56:58 +05:30
jamesgeorge007 b4a3911887 fix: typo 2020-01-03 11:55:34 +05:30
jamesgeorge007 6698caed01 fix: typo 2020-01-03 11:53:29 +05:30
jamesgeorge007 9ae1cefcdc fix: typo 2020-01-03 11:51:54 +05:30
jamesgeorge007 187697c579 fix: grammar 2020-01-03 11:50:06 +05:30
jamesgeorge007 8ad8a21dd1 fix: grammar 2020-01-03 11:49:26 +05:30
jamesgeorge007 78cd472c68 fix: use indices instead of indicies 2020-01-03 11:49:01 +05:30
Tobias Koppers 14e901225c remove return value of ChunkGraph.connectChunkAndModule 2019-11-10 21:05:26 +01:00
Tobias Koppers ccc6f6c691 improve extraceBlockModulesMap performance
reduce memory usage, exit early
2019-10-30 07:48:41 +01:00
Tobias Koppers 8d46b21fad add Dependency.getCondition and conditional ModuleGraphConnections
getDependencyReference is no longer used to check of connection
2019-10-30 07:48:32 +01:00