Commit Graph

20 Commits

Author SHA1 Message Date
Matvii Hodovaniuk 62a1474db5
Remove code duplication
The body of this case clause 'UsageState.Unknown' duplicates the body of this case clause 'case UsageState.Used'. This may be caused by a copy-paste error. If this usage is intentional, consider using fall-through to remove code duplication.
2020-12-29 19:47:23 +02:00
Tobias Koppers 07fc323684 ignore cloned ExportInfo during hashing 2020-12-23 20:39:54 +01:00
Tobias Koppers cbcd459d19 fix conflicting real imports and type imports 2020-11-26 10:02:59 +01:00
Tobias Koppers f32762ed69 fix #11990 2020-11-16 11:53:19 +01: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 0fe03c7af0 fix unused modules in chunk when optimizing runtime-specific
fixes #11673
2020-10-16 11:47:33 +02:00
Tobias Koppers 2888c8a406
Revert "fix unused modules in chunk when optimizing runtime-specific " 2020-10-15 20:17:26 +02:00
Tobias Koppers 50c3a83340 fix unused modules in chunk when optimizing runtime-specific
fixes #11673
2020-10-15 10:18:41 +02:00
Tobias Koppers db8c974733 return false when no valid target can be found 2020-09-15 12:36:31 +02:00
Tobias Koppers 9af1d7526b refactor module concatenation to address discovered bugs/edge cases 2020-09-15 12:36:02 +02:00
Tobias Koppers 71cf7f4dc8 add support for reexporting in CommonJS
and necessary refactoring + fixes for that
2020-08-17 21:32:47 +02:00
Tobias Koppers 3cf8299602 add test case for conflicting named with namespace reexport
and fix problem
2020-08-13 10:59:56 +02:00
Tobias Koppers 801f01cb87 performance optimization 2020-08-13 10:22:37 +02:00
Tobias Koppers 8b91b6c508 use target info to implement side effects plugin 2020-08-12 23:20:45 +02:00
Tobias Koppers 67077b7183 replace recursion with loop 2020-08-12 22:37:33 +02:00
Tobias Koppers 9b80cde76c store multiple targets per ExportInfo
resolve target when reading
2020-08-12 21:41:03 +02:00
Tobias Koppers 163e7674a0 track the target binding of harmony reexports
display target binding in module info header
check conflicting star exports (fixes #7562) when statically known
2020-08-11 20:13:01 +02:00
Tobias Koppers a4f17775b1 fix dependOn behavior with runtimes, fix runtime passing by entry 2020-07-30 11:18:09 +02:00
Tobias Koppers 1265765141 polish, types 2020-07-27 22:41:04 +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