Commit Graph

30 Commits

Author SHA1 Message Date
alexander.akait 4f6dc32d38 chore: improve types 2023-04-21 19:22:33 +03:00
Tobias Koppers 381614aecc cache computation of values passed for hashing 2021-09-24 14:44:20 +02: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 e1a405e3c2 prettier 2020-11-26 10:52:55 +01:00
Tobias Koppers cbcd459d19 fix conflicting real imports and type imports 2020-11-26 10:02:59 +01: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 2abcfc0058 set dependency categories for all dependencies 2020-06-17 23:04:37 +02:00
Pushkar DK 31e3369a73 Add 'webpackExports' & make only referenced exports available in import() 2020-06-06 00:11:21 +05:30
Tobias Koppers 44a5050b07 fix that using `module` in a ESM causes exports deopt 2020-05-19 02:07:26 +02:00
Tobias Koppers 782e4535ac Refactor how exportsType work
add flagged exportsType for __esModule flagged
add getExportsType to merge strict with exportsType
move CommonJsStuffPlugin into CommonJsPlugin
split CommonJsPlugin into imports and exports part
enable minimal tree shaking for CommonJs imports and exports
2019-12-06 11:13:08 +01:00
Tobias Koppers ab8a768cac remove module.id and loaded shortcuts and only include them when used 2019-12-06 11:09:43 +01:00
Tobias Koppers 1d72a05fed Merge tag 'v4.36.0' into next
4.36.0
2019-07-17 16:02:33 +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 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
Florent Cailhol a2ccf34d98 Fix ModuleDecoratorDependency serialization 2018-12-06 22:16:56 +01:00
Florent Cailhol 74e6346363 Replace module buildins by runtime modules 2018-12-06 22:16:31 +01:00
Tobias Koppers 7c37a6a972 handle runtime requirements 2018-11-29 16:07:17 +01:00
Tobias Koppers dda3c03b8d Refactor getInitFragments to a property in templateContext and apply method
Having only a single method in DependencyTemplate makes it easier to override
2018-11-16 16:40:03 +01:00
Tobias Koppers a852828279 add persistent caching prototype 2018-10-17 21:25:39 +02:00
Tobias Koppers bad9d8a271 move Module.id into ChunkGraph
remove disconnect and unseal from Module
2018-08-28 15:08:52 +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
Tobias Koppers 3618cc1b3c remove originModule from Dependencies and add parent module to ModuleGraph 2018-08-07 14:20:53 +02:00
Tobias Koppers 381e2db200 replace Module.reasons and Dependency.module with ModuleGraph 2018-08-02 17:54:44 +02:00
Tobias Koppers 831e71c797 make argument of DependencyTemplate an object 2018-08-02 16:07:29 +02:00
Tobias Koppers f68c1f7ab6 add additional arguments to updateHash 2018-08-02 16:04:10 +02:00
Tobias Koppers d6f8e49c3a refactor getInitFraments to take TemplateContext
add a hack to include the current module as property in source
later we will refactor DependencyTemplate.apply to take a TemplateContext too
2018-07-30 23:07:50 +02:00
Tobias Koppers b2dca34043 some properties of dependencies should contribute to hash 2018-07-30 23:07:25 +02:00
Tobias Koppers 8a996186a0 remove range from ModuleDecoratorDependency 2018-07-30 22:42:15 +02:00
Tobias Koppers c5c4f6bdd3 remove DependencyTemplate.getInitFragments.source 2018-07-30 22:42:01 +02:00
Tobias Koppers 872839450f move ModuleDecoratorDependency into a separate file 2018-07-30 22:40:31 +02:00