Commit Graph

69 Commits

Author SHA1 Message Date
Tobias Koppers 3b48429eb5 add MemCache for memory caching per module which is invalidated when module or any referenced modules changes
add `experiments.cacheUnaffected`
add `cache.cacheUnaffected` (type: memory) resp `cache.memoryCacheUnaffected` (type: filesystem)
2021-09-24 15:23:29 +02:00
Tobias Koppers 4a8bf4c084 allow to configure all hash functions used
fix default hash function for HttpUriPlugin to sha512
2021-09-23 14:55:13 +02:00
Tobias Koppers b16568a253 upgrade filename runtime module to full hash module when referencing a full hash chunk 2021-09-02 10:29:59 +02:00
Tobias Koppers 532b07e0c1 faster hashing for the common case 2021-04-28 09:10:45 +02:00
Tobias Koppers acfea9dae4 improve module graph hashing via bigints 2021-04-23 14:51:24 +02:00
Tobias Koppers 70316dc998 fix #13130 2021-04-15 16:32:00 +02:00
Tobias Koppers 18967078cb cleanup modules after compilation to avoid leaking references when they are cached 2021-03-15 11:23:54 +01:00
Tobias Koppers 69218d4ea0 fix problem with startup of non-js initial chunks
fixes #12880
2021-03-14 19:54:50 +01:00
Tobias Koppers c7f93af138 refactor startup logic to better integrate with libraries
get rid of startupNoDefault and many custom logic regarding this in jsonp chunk loading
add onChunksLoaded runtime method to cover that for all chunk loading types
add `__webpack_runtime_id__` to access the current runtime
allow to use onChunksLoaded for other module types too
2021-03-08 20:25:09 +01:00
Tobias Koppers 84ec7708c2 improve performance of getModuleRuntimes 2021-02-23 00:25:38 +01:00
Tobias Koppers b352f20d2d add "first" to SetHelpers 2021-02-09 21:26:30 +01:00
Tobias Koppers f25345cae9 refactor code generation and HMR plugin to generate real module hashes for HMR 2021-01-26 14:45:11 +01:00
Tobias Koppers 97b83161d9 move responsibility of exports info and connected modules hashing from Dependencies to Module
fixes a bug where modules are incorrectly cached when exports info of connected modules change
2021-01-24 21:36:36 +01:00
Tobias Koppers 916bf69cae compute chunk roots correctly when using transitive connections
also use module.nameForCondition() to compute module ids

fixes https://github.com/webpack-contrib/mini-css-extract-plugin/issues/676
2021-01-11 18:14:24 +01:00
Tobias Koppers 7661ad868a generate code that executes depending on runtime
fixes #11770
2020-10-27 06:30:49 +01:00
Tobias Koppers 8e562aa260 fix some nitpicks with active state 2020-10-07 09:36:41 +02:00
Tobias Koppers 77cdce7393 remove unused methods, improve code coverage 2020-07-29 11:14:26 +02:00
Tobias Koppers 8948263db8 avoid using getChunkModuleMaps as it doesn't support different modules per runtime 2020-07-28 17:16:32 +02:00
Tobias Koppers 1027268fab bugfixes 2020-07-28 10:13: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 50ec72a6ca use the full hash on modules that need the full hash of the compilation
use getFullHash runtime module for updating the hash in HMR
2020-04-30 17:57:01 +02:00
Tobias Koppers 6daf2ce243 make private property public 2020-02-28 09:50:58 +01:00
Tobias Koppers bcf2f55ecb remove ChunkGraph.getOrderedChunkEntryModulesWithChunkGroup as it makes no sense 2020-02-26 17:22:46 +01: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
Tobias Koppers 522d80f33b allocate less for empty Sets for runtime requirements and file/context/missingDependencies 2020-01-29 21:46:14 +01:00
Tobias Koppers 3378ac21cf additional performance improvement for chunks with single source type 2019-11-20 15:27:38 +01:00
Tobias Koppers fe67677f55 offer cached methods to get chunk modules by source type 2019-11-20 11:20:34 +01:00
Tobias Koppers accd66c3ba
Merge pull request #9971 from smelukov/deprecation-codes
Add deprecation codes
2019-11-15 12:04:47 +01:00
Tobias Koppers 74074a9b18 add deprecationCode argument to getChunk/ModuleGraphForChunk/Module 2019-11-15 10:07:41 +01:00
Tobias Koppers 5cd866e7e3 order entry modules for deterministic chunk hash 2019-11-14 18:05:03 +01:00
Sergey Melyukov a214be41a0 add deprecation codes 2019-11-14 17:03:15 +03:00
Tobias Koppers 14e901225c remove return value of ChunkGraph.connectChunkAndModule 2019-11-10 21:05:26 +01:00
Tobias Koppers 10fee6eca9 Make runtimeInChunks undefined if empty to save memory 2019-11-10 21:05:14 +01:00
Tobias Koppers 07ccb8ba49 Make entryInChunks undefined if empty to save memory 2019-11-10 21:05:11 +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
Tobias Koppers 42614b5665 inline cache ChunkGraph attached data access 2019-10-28 14:41:03 +01:00
Tobias Koppers 9e6e812b29 lint fix 2019-06-04 23:29:03 +02:00
Tobias Koppers de61023616 add side-by-side wasm support based on async modules
type: "webassembly/async-experimental"
remove i64 importing limitation since it will have BigInt integration eventually
update wasm example
2019-06-04 23:28:56 +02:00
Tobias Koppers c5f94f3b6a don't emit and load JS files for chunks without JS modules
allow custom module types in rules
allow configCases to access stats
2019-05-22 13:12:15 +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 251605e0cc
Merge pull request #9032 from Connormiha/optimize-check-availible-chunk
Move isAvailible from method to module
2019-05-09 09:45:20 +02:00
Adam Postma ff8c37e887 correct spelling mistake, update identifer to identifier 2019-04-12 10:29:41 -06:00
Mihail Bodrov 8a78b53baa Move isAvailible from method to module 🎨 2019-04-12 01:07:25 +03:00
Tobias Koppers f446bf8a9b add ability to load dependent chunks for non-web targets
This allows to use `splitChunks` for initial chunks in i. e. node and webworker targets
2018-12-29 12:48:59 +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 59e67d8fa4 optimize array operation 2018-12-06 21:00:50 +01:00
Tobias Koppers e5e0f44e29 add algorithm to extract graph roots
show only graph roots in chunks by default
2018-12-06 20:57:04 +01:00
Tobias Koppers 40e4860aef Use correct size of getIntegratedChunksSize 2018-12-05 20:23:45 +01:00
Tobias Koppers a3edfe6ef6 Support sizes for chunk and in stats for chunk 2018-12-05 20:23:43 +01:00
Tobias Koppers 0ff1a4f8f8 Merge tag 'v4.27.0' into next
4.27.0
2018-12-04 11:02:26 +01:00