Commit Graph

56 Commits

Author SHA1 Message Date
alexander.akait ab47c696a4 refactor(types): more 2023-06-03 20:52:25 +03:00
Sean Larkin fa4cbf11a1 add more module type constants, use them across codebase 2023-03-31 10:56:32 -07:00
Tobias Koppers da098d7872 optimization.sideEffects is compatible with cacheUnaffected 2021-10-05 16:54:51 +02:00
Tobias Koppers 91b6972144 add memCache2 for mem caching with module/chunk ids 2021-10-05 15:08:18 +02:00
Tobias Koppers b0fa9ccada pretty files 2021-05-11 09:31:46 +02:00
Tobias Koppers 1c0b88c72f fix bug where ExportInfo uses inactive connections to find the target of an export
This happens when multiple exports * export the same name but the first one is discovered later in the process
In this case the ExportInfo contains both connections, but the second one is inactive.
2021-02-22 12:47:34 +01:00
Tobias Koppers 1e2634fdd8 manual side effects flagging should override automatic analysis 2020-12-15 14:40:54 +01:00
Tobias Koppers dade079110 only move export info targets when also moving dependencies
fix #12071
2020-11-30 10:18:38 +01:00
Tobias Koppers c7ea63875c improve side effects analysis to report imported and reexports symbols as side-effect-free
add bailout messages for side effects
2020-11-28 18:10:27 +01:00
Tobias Koppers f32762ed69 fix #11990 2020-11-16 11:53:19 +01:00
Tobias Koppers e1b5a78a24 add optimization.sideEffects: "flag" and use this by default
analysing for side effects cause unnecessary changes in parent modules and we want to avoid that in development
2020-10-27 06:50:07 +01:00
Tobias Koppers a8fb45d242 fixes crash in SideEffectsFlagPlugin
fixes #11615
2020-10-09 23:15:35 +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 8b91b6c508 use target info to implement side effects plugin 2020-08-12 23:20:45 +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 25a41fa9bb optimize storage format of ExportMode 2020-07-06 21:40:39 +02:00
Tobias Koppers 5efac22a5c improve side-effects handling for dynamic reexports 2020-05-19 02:08:11 +02:00
Tobias Koppers b9c50fdb09 fix jsdoc documentations 2020-04-28 19:42:58 +02:00
Tobias Koppers e96695a18a add more time logging 2020-01-30 16:10:56 +01:00
Tobias Koppers e6113e9787 optimize SideEffectsFlagPlugin performance 2020-01-30 16:10:53 +01:00
Tobias Koppers 61e8b44fb9 allocate Module.factoryMeta only when needed 2019-11-10 21:05:21 +01:00
Tobias Koppers 4479b6c660 add comment, optimize code 2019-10-30 09:35:17 +01:00
Tobias Koppers 9010d8bf77 allow to disable connection
fix bug
2019-10-30 09:35:14 +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 43bc7a306e Refactor to track nested exports
Harmony dependencies track access to nested properties
Flag nested exports
2019-05-29 11:55:00 +02:00
Tobias Koppers abc825d58f Merge tag 'v4.32.0' into next
4.32.0
2019-05-20 14:46:31 +02:00
Tobias Koppers a4bbdae0d2 fix problem with dll and sideEffects
allow to redirect module and id in reexports
SideEffects plugin redirects reexports too
fixes #9146
2019-05-20 11:28:33 +02:00
Tobias Koppers a3f2314a63 replace micromatch with glob-to-regexp for sideEffects flag 2019-05-16 21:54:03 +02:00
Florent Cailhol b12f24d20c Update hook types 2019-05-10 09:52:22 +02:00
Tobias Koppers b25ff237bb Prettify source code 2019-02-05 10:08:45 +01:00
Tobias Koppers b6ad10b2c1 bugfixes and HarmonyExportImportedSpecifier optimization 2019-02-01 11:45:24 +01:00
Tobias Koppers ef9e25d8ea report dependencies from resolver to the compilation
refactor NormalModuleFactory
2019-01-08 15:14:25 +01:00
Tobias Koppers 0f1f69a9d6 hide id overriding in HarmonyImportSpecifierDependency 2018-08-21 11:06:59 +02:00
Florent Cailhol 7b02084bc5 Replace Basic and Advanced optimzation hooks by stages 2018-08-16 14:10:51 +02:00
Tobias Koppers 381e2db200 replace Module.reasons and Dependency.module with ModuleGraph 2018-08-02 17:54:44 +02:00
Tobias Koppers 11e127d162 pass moduleGraph along with multiple methods 2018-08-02 17:54:42 +02:00
Tobias Koppers ec1329a7d4 make libIdent required
add types
2018-08-02 16:29:20 +02:00
Tobias Koppers cf5f1d723c format existing code 2018-07-30 21:29:21 +02:00
Tobias Koppers 2fa351a178 make ExportMode.module a callback function
fix comment
2018-07-26 15:53:11 +02:00
Tobias Koppers 025d3d0836 remove unused code 2018-07-25 13:17:44 +02:00
Tobias Koppers 271fb7b543 more performant changing of reasons 2018-05-30 20:04:37 +02:00
Florent Cailhol 2a9452e51b Add brackets for multiline if/for statements 2018-05-29 15:45:44 +02:00
Tobias Koppers 351c9936e6 fixup reasons when redirecting dependencies for side-effects
show reason explanation in stats

fixes #7428
2018-05-29 14:12:31 +02:00
Tobias Koppers ae8d6741d7 fix bug with incorrectly emitted modules 2018-05-27 21:53:22 +02:00
Tobias Koppers 115a72ce50 SideEffectsPlugin don't modify cache entries
fixes #7400
2018-05-27 21:53:21 +02:00
Tobias Koppers 5238159d21 run prettier on existing code 2018-02-25 02:00:20 +01:00
Jevan Chan c334d0875b replace minimatch with micromatch 2018-02-21 00:36:14 +08:00
Jevan Chan b620a58b40 replace glob-regex with minimatch 2018-02-19 22:50:05 +08:00
Jeremy Greer 2ef4b0101e Add support for sideEffects glob(s)
In addition to Booleans, the `sideEffects` value in a package can
identify child modules with side effects by a glob or Array of globs.
2018-01-18 13:29:22 -06:00
Tobias Koppers 27d60f7dd6
Merge pull request #6126 from ooflorent/remove_plugin_calls
Remove more plugin calls
2017-12-15 13:42:38 +01:00