Commit Graph

52 Commits

Author SHA1 Message Date
Tobias Koppers a08eca78ff
Merge pull request #12132 from jakenorthey/feature/prioritize-eager-shared-modules 2021-01-18 17:00:21 +01:00
Tobias Koppers 58d459bff1 accept truthy/falsy values for eager
save 2 chars for each provided shared module
prettify test cases
2021-01-14 14:24:34 +01:00
Tobias Koppers 48571c663f add selective runtime requirements from startup logic which doesn't prevent inlining modules
avoid using startup function for grab data from preexecuted chunks
2020-12-11 14:36:48 +01:00
Jake Northey 8f7fac5fa2 fix: fix syntax error and add tests for comparing eager to eager modules and non-eager to non-eager modules 2020-12-08 18:54:40 -05:00
Jake 60183bd220
fix: handle eager === activeVersion.eager === true
Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2020-12-07 08:30:51 -05:00
Jake Northey 3fe999a621 fix: remove unnecessary default parameter value 2020-12-05 14:59:37 -05:00
Jake Northey 19d6f52ca7 check if existing dependency is eagerly loaded 2020-12-03 12:24:14 -05:00
Jake Northey 1d9b77c060 prioritize eager shared module dependencies in dependency registration 2020-12-03 12:07:14 -05:00
evilebottnawi 8c19efb7fd chore(deps): update `schema-utils` 2020-10-05 21:58:54 +03:00
Tobias Koppers a8542d3317 fix circular references between containers and modules in containers 2020-09-17 10:44:52 +02:00
Tobias Koppers 2d842c0508 pass on shareScope in SharePlugin 2020-08-03 14:32:42 +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 b0cc32cb17 providing module do not override already loaded modules
fixes a bug where dynamic loaded containers override shared modules
2020-07-09 10:40:36 +02:00
Tobias Koppers 2689d026b1 refactor semver logic to be internal
share scope uses string version instead of parsed one
2020-07-02 16:09:57 +02:00
Tobias Koppers 2a0620a7f1 improve semver range detection 2020-07-02 16:09:50 +02:00
Tobias Koppers a9993bbabf improve semver range detection 2020-07-02 16:09:46 +02:00
Tobias Koppers 3fcd5f9bc5 add full Semantic Versioning for Shared Modules
change storage format in the share scope
choose shared module deterministic from the same origin
remove array syntax from version and requiredVersion in schema
2020-07-02 16:09:39 +02:00
Tobias Koppers 23f922bed3 make bundles with Module Federation more stable 2020-07-02 15:28:17 +02:00
Tobias Koppers 79f3694034 fix casing in ProvideSharedPlugin 2020-06-24 23:06:37 +02:00
Tobias Koppers b30b9681fa opt-out from unsafe caching when providing shared module as side-effect 2020-06-24 23:06:36 +02:00
Tobias Koppers 630ebfdf47 rename module federation classes for be more specific 2020-06-18 15:11:29 +02:00
Tobias Koppers 2abcfc0058 set dependency categories for all dependencies 2020-06-17 23:04:37 +02:00
Ivan Kopeykin 8174145782 upgrade enhanced-resolve 2020-06-17 14:22:37 +03:00
Ivan Kopeykin 9061a5ca94 add RESOLVE_OPTIONS to resolveMatchedConfigs 2020-06-16 21:20:46 +03:00
Ivan Kopeykin 198e51a485 Merge branch 'master' into exports-field
# Conflicts:
#	lib/dependencies/ImportDependency.js
#	lib/sharing/ConsumeSharedPlugin.js
#	lib/sharing/ProvideSharedPlugin.js
#	types.d.ts
2020-06-16 21:16:41 +03:00
Ivan Kopeykin 3f8def8185 fix discussions
- add module condition
- rename EnhancedResolveOptions
- fix applyByDependency util function
- use EMPTY_RESOLVE_OPTIONS when resolveOptions are undefined
2020-06-16 21:02:31 +03:00
Tobias Koppers 590af1edfe improve readable names
update example
add optionalDependencies to automatic requiredVersion sources
2020-06-15 22:45:36 +02:00
Tobias Koppers 1864cf59ad fix resolving of direct fallback requests
fix persistent caching test case
2020-06-15 20:12:38 +02:00
Tobias Koppers 92a3079f29 fix typing errors 2020-06-15 20:12:36 +02:00
Tobias Koppers ad56d8abb1 improve handling of relative/absolute requests in the ProvideSharedPlugin 2020-06-15 16:20:34 +02:00
Tobias Koppers d1828d4582 allow ProvideSharedPlugin to handle relative requests 2020-06-13 15:17:28 +02:00
Tobias Koppers 1c42f71250 allow to provide and consume multiple versions of shared modules 2020-06-13 14:45:37 +02:00
Tobias Koppers 42e14d6a42 provide shared based on used modules and used version 2020-06-10 16:30:08 +02:00
Ivan Kopeykin d2a08e3cc8 rework how byDependency applied
remove dependencyType parameter for resolver factory
add dependencyType option in enhanced resolve options
2020-06-09 01:32:24 +03: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
Ivan Kopeykin d7dd4ececb use resolverFactory.get with dep category option 2020-06-01 15:16:14 +03:00
Tobias Koppers 1879e46e04 fix sharing test cases 2020-05-27 16:02:41 +02:00
Tobias Koppers 4b61de7b14 strictVersion defaults to false for singleton modules 2020-05-27 15:16:44 +02:00
Tobias Koppers 6f5d229661 add singleton shared modules 2020-05-27 15:10:57 +02:00
Tobias Koppers d5df7a39fd allow to have multiple version in share scope 2020-05-27 14:42:05 +02:00
Tobias Koppers abf1aedefd Only print warning if providing a higher version 2020-05-27 13:29:03 +02:00
Tobias Koppers bb30ea2216 automatically determine version of shared module from package.json 2020-05-27 11:53:59 +02:00
Tobias Koppers 90b8056b1d use long property names in share scope 2020-05-27 11:51:25 +02:00
Tobias Koppers ab0ea4a4ce use long property names in share scope 2020-05-26 21:51:14 +02:00
Tobias Koppers cbb7ffc94d test and fix persistent caching 2020-05-26 17:43:08 +02:00
Tobias Koppers e78a76b2e0 remove all overrides and overridables related code 2020-05-26 17:26:28 +02:00
Tobias Koppers edf03440ba add SharePlugin
let ModuleFederationPlugin use the SharePlugin
update container test cases to new behavior
2020-05-26 17:11:21 +02:00
Tobias Koppers 2fc44c2343 add share plugin 2020-05-26 00:46:09 +02:00
Tobias Koppers 1b3246361b add consume shared module plugin 2020-05-25 23:14:19 +02:00
Tobias Koppers e659ec494c add provide shared module plugin 2020-05-25 17:14:59 +02:00