Commit Graph

277 Commits

Author SHA1 Message Date
Patrik Åkerstrand 398fdef5c8
Fix module concatenation renaming bug
Fixes a case where variable renaming due to module concatenation caused
the generated code to look up a different property than the source code, when
combined with a default value for the property

Closes #12712
2021-02-19 12:08:21 +01:00
Tobias Koppers 9f3950e571 add support for libraries combined with iife: false
fix missing runtime requirement for system.js context
fix inlining of modules when conflicting symbols are defined on top-level
2021-02-11 11:19:24 +01:00
Tobias Koppers 3cf2f45290 remove unused method 2021-01-25 20:30:46 +01:00
Tobias Koppers 38c7cf2d85 fix caching crash in ConcatenatedModule
Ensure that no warnings/errors occur during testing
add serialization for some missing warnings
2021-01-08 15:44:26 +01:00
Tobias Koppers 10aa3daede add experiments.layers
add layers to define different module layers
support module layers in stats

add layer support for NormalModules

fixes #11466
2021-01-05 20:50:59 +01:00
Tobias Koppers a0d2b99a34 fixes #12114 2020-12-04 17:03:12 +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 590aacc2ae make visible exports from non-harmony modules more consistent
fixes #11995
2020-11-16 17:19:36 +01:00
Tobias Koppers 3601b4bfe3 handle ASI issue between concatenated modules
fixes #11897
2020-11-04 12:02:36 +01:00
Tobias Koppers 77aed6004a fix a few edge cases with interop
add more test cases
2020-11-03 10:40:39 +01:00
Tobias Koppers c7a9b8ed06 handle renaming in super class expression in nested scopes correctly
fixes #11840
2020-11-02 14:16:04 +01:00
Tobias Koppers 18495151b8 handle the case when execution order in a concatenated module is runtime-dependent
fix #11863
2020-10-29 17:53:56 +01:00
Tobias Koppers 167fba77cf handle runtime-dependent code in concatenated modules 2020-10-27 11:43:58 +01:00
Tobias Koppers 0a8529fcb1 fix undetected module references 2020-10-20 13:50:32 +02:00
Karlis Gangis 95eabe47ec fix: handle star import name collisions in module concatenation 2020-10-20 13:50:56 +03:00
Tobias Koppers b3c73a543b fix runtime-specific handling in concatenated modules 2020-10-16 11:47:30 +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 5d9d9b90fb fix runtime-specific handling in concatenated modules 2020-10-15 10:18:41 +02:00
Tobias Koppers c00f65bc40 follow reexport in concatenated modules even if they are skipped due to side effects
fixes #11662
2020-10-13 10:01:54 +02:00
Tobias Koppers 47097196bd skip connections copied to concatenated module
fixes #11617
2020-10-10 01:14:00 +02:00
Tobias Koppers 8e562aa260 fix some nitpicks with active state 2020-10-07 09:36:41 +02:00
Tobias Koppers 7948cb29df don't touch not provided exports as they could be on the prototype
fix #11580
2020-10-06 15:38:17 +02:00
Tobias Koppers 51b6e9c4d7 fix delete in concatenated module 2020-09-29 22:12:42 +02:00
Tobias Koppers eddd3206dc add raw export for named reexport from non-harmony 2020-09-15 12:36:29 +02:00
Tobias Koppers 277d4b1b67 handle export mangling in concatenated modules 2020-09-15 12:36:23 +02:00
Tobias Koppers 9af66ff9af revert to registering the namespace export because we need to know this early 2020-09-15 12:36:16 +02:00
Tobias Koppers 39e1a7e4c7 move magic names to constants in ConcatenationScope
improve types
2020-09-15 12:36:06 +02:00
Tobias Koppers 9af1d7526b refactor module concatenation to address discovered bugs/edge cases 2020-09-15 12:36:02 +02:00
Tobias Koppers 9941a8a497 create root reexports based on export mappings instead of dependencies 2020-09-15 12:35:55 +02:00
Tobias Koppers 5560415856 create root exports based on export mappings instead of dependencies 2020-09-15 12:35:46 +02:00
Tobias Koppers 91cc17b438 register exports in DependencyTemplates 2020-09-15 12:35:38 +02:00
Tobias Koppers 21e202eb24 move concatenation logic to HarmonyImportSpecifierDependency 2020-09-15 12:35:30 +02:00
Tobias Koppers fc551fa6f3 move concatenation logic to HarmonyExportExpressionDependency 2020-09-15 12:35:21 +02:00
Tobias Koppers 47344e7e77 move concatenation logic to HarmonyExportSpecifierDependency and HarmonyExportImportedSpecifierDependency 2020-09-15 12:35:13 +02:00
Tobias Koppers 04dde38b4c move concatenation logic to HarmonyImportSideEffectDependency 2020-09-15 12:35:03 +02:00
Tobias Koppers fdd4a7713f add ConcatenationScope 2020-09-15 12:34:50 +02:00
Ivan Kopeykin a3fc25cadb refactor asiSafe flag in dependencies 2020-08-29 17:00:03 +03:00
Ivan Kopeykin 35c56e67ae refactor how asi handled
- add asiSafeExpression helper for JavascriptParser
- use asiSafe flag in DefinePlugin
- try to use (...) instead of Object()
2020-08-28 19:46:56 +03:00
Tobias Koppers c0249af6d1
Merge pull request #11370 from webpack/feature/javascript-parser-improvement
use bitmask instead of array+set in getMemberExpressionInfo
2020-08-28 10:08:22 +02:00
Tobias Koppers 49d9ec5625 cleanup public api and expose JavascriptParser 2020-08-28 01:46:14 +02:00
Tobias Koppers cee47dc867 Store cache dependencies inside of Snapshot to reduce cache size 2020-08-24 18:16:54 +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 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
Ivan Kopeykin 4fc44a3398 add more types 2020-08-02 23:47:54 +03:00
Tobias Koppers 1027268fab bugfixes 2020-07-28 10:13:34 +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
Tobias Koppers 3df380e2d7 add script external
change defaults of ModuleFederationPlugin to var library and script remoteType
allow using empty entry in config
2020-06-04 03:18:07 +02:00
Tobias Koppers fde5b3df11 allow to concatenate modules when used exports are known 2020-05-19 14:42:21 +02:00
Tobias Koppers f06086c53b
Merge pull request #10631 from mohsen1/mohsen--ts3.9
Upgrade to TypeScript 3.9
2020-05-13 17:56:20 +02:00