Tobias Koppers
6b83f85141
Module.libIdent is scoped by the module layer if there is one
2022-01-14 12:05:28 +01:00
Asriel Yu
136b723023
fix callback err type should include null
2021-12-24 20:27:31 +08:00
Tobias Koppers
b854db4db8
Merge pull request #14774 from tanhauhau/tanhauhau/reuse-name-variable-in-shared-scope
...
reuse name variable in share scope
2021-11-26 09:22:49 +01:00
Tobias Koppers
d91248711b
fix and test module federation with ESM
2021-11-25 12:09:03 +01:00
Tan Li Hau
4ed2ecfcff
reuse name variable in share scope
2021-11-21 09:38:19 +08:00
Tobias Koppers
94852e07f7
allow to disable runtime chunk per entry via `runtime: false`
...
and also via `ModuleFederationPlugin`.`runtime`
2021-07-05 11:32:45 +02:00
Tobias Koppers
e21b1d46fe
precompile schemas for improved startup performance
2021-04-16 16:02:58 +02:00
Tobias Koppers
d808d04d26
attach the chunk graph to RuntimeModules
2021-04-14 12:26:35 +02: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
Art Chen
cd0310f6d6
feat: support custom chunk name in container expose options
...
Module federation generates async chunks for exposed modules, which by
default named after the internal module id. This change allows users to
assign a custom name so that the file can be statically referenced.
2021-01-28 09:00:05 -08:00
Tobias Koppers
99d7a205c2
prettier
2020-11-28 20:04:11 +01:00
Tobias Koppers
e1a405e3c2
prettier
2020-11-26 10:52:55 +01:00
Tobias Koppers
11a7cac537
add useSimpleSourceMap flag to enable/disable OriginalSource for generated code
...
pass reduced options object to Source.map() function
2020-10-26 16:33:38 +01:00
evilebottnawi
8c19efb7fd
chore(deps): update `schema-utils`
2020-10-05 21:58:54 +03:00
骗你是小猫咪
4e1ed1f6d1
Merge branch 'master' into #11419
2020-09-17 20:33:48 +08:00
Tobias Koppers
a8542d3317
fix circular references between containers and modules in containers
2020-09-17 10:44:52 +02:00
shaodahong
e29e3cdc0d
return if undefined
2020-09-03 23:14:11 +08:00
shaodahong
d76f72e0c7
fix: if Container shard undefined fixes #11419
2020-09-03 20:36:23 +08:00
Tobias Koppers
07d863e14c
implement enabledChunkLoadingTypes approach
...
allow chunkLoading per entry
allow custom library/chunkLoading types
2020-08-28 10:59:37 +02:00
Tobias Koppers
62ccae1abd
build errors should be errors even for optional modules
...
optional modules should only treat "not found" errors as warnings
fixes #9161
2020-08-14 20:03:48 +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
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
d558943377
improve runtime requirement
2020-05-27 12:05:10 +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
1b3246361b
add consume shared module plugin
2020-05-25 23:14:19 +02:00
Tobias Koppers
264a171a54
change Module Federation API to be more similar to exports field
2020-05-20 20:13:14 +02:00
Tobias Koppers
e476168fe7
allow to expose and consume an index module from containers
2020-05-19 17:49:20 +02:00
Tobias Koppers
aa750e4bd0
test cases and bugfix
2020-05-14 17:25:14 +02:00
Tobias Koppers
48a6d7f3b2
fix missing request property
2020-05-14 16:20:00 +02:00
Tobias Koppers
4b6f53d04c
fix deserialization of RemoteModule and RemoteOverridesModule
2020-05-14 16:06:49 +02:00
Tobias Koppers
4f194f0748
advanced configs for container plugins
...
refactor options parsing to allow advanced config options
automatic scoping has been removed and a scope method is offered instead
move shared schema definitions into a shared schema to allow to sync them
allow to pass multiple modules to a single exposed name
they are all executed and the last one is exported
allow to pass multiple container locations to remotes
they are tried in order, falling back to the next one when one fails
allow remotes to be promises as preparation of async externals
2020-05-14 15:50:35 +02:00
Tobias Koppers
7343b2a89c
improve error handling and reporting
2020-05-05 21:51:20 +02:00
Tobias Koppers
24d1ca50b7
generate useful module ids for container-related modules
2020-05-05 21:51:17 +02:00
Tobias Koppers
6b13cafa20
dedupe remote overrides
...
fix transitive overriding
fix missing overriables for empty overridables
2020-05-04 15:01:50 +02:00
Tobias Koppers
d655a5c3df
fix missing overridables runtime when no import() is used at all
2020-05-01 21:40:00 +02:00
Tobias Koppers
5ad346ec98
validate options for container-related plugins
...
expose options types via declarations
hide private properties in plugins
move container-related schemas into container folder
2020-04-30 18:07:17 +02:00
Tobias Koppers
e9ae850d66
support overridables in initial chunks
2020-04-30 00:40:38 +02:00
Tobias Koppers
a92189e26d
fix persistent caching for container modules
2020-04-29 13:08:34 +02:00
Tobias Koppers
004a24760a
make ContainerEntryModule serializable
2020-04-29 12:45:54 +02:00
Tobias Koppers
c3c2b55e3b
only use container resp container reference plugin when exposes resp remotes are set
2020-04-29 12:45:53 +02:00
Tobias Koppers
0ccb4da411
fix using global library as fallback
...
test module federation without library provided
test circular dependencies between containers
test multiple containers in a single build
test System.js module federation
improve fakeSystem implementation for circular dependencies and local files
2020-04-14 15:14:53 +02:00
zackjackson
b5b8406a1d
test: adding test case wip
2020-04-14 15:08:40 +02:00
Zack Jackson
1658aca151
Update lib/container/ModuleFederationPlugin.js
...
Co-Authored-By: Tobias Koppers <tobias.koppers@googlemail.com>
2020-04-14 15:08:38 +02:00
Zack Jackson
8fe34f08da
Update lib/container/ModuleFederationPlugin.js
...
Co-Authored-By: Tobias Koppers <tobias.koppers@googlemail.com>
2020-04-14 15:08:37 +02:00
Zack Jackson
41a2a6ef9b
Update lib/container/ModuleFederationPlugin.js
...
Co-Authored-By: Tobias Koppers <tobias.koppers@googlemail.com>
2020-04-14 15:08:35 +02:00
zackjackson
69860e0531
style: linting
2020-04-14 15:08:34 +02:00
Zack Jackson
e9db31c469
fix: module federation plugin library should be optional
...
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. -->
<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->
Addressing subtask on the Module Federation Project board
<!-- Try to link to an open issue for more information. -->
https://github.com/webpack/webpack/projects/6#card-33743655
<!-- In addition to that please answer these questions: -->
**What kind of change does this PR introduce?**
Defaulting options from webpack core output config
<!-- E.g. a bugfix, feature, refactoring, build related change, etc… -->
fix/enhancement
**Did you add tests for your changes?**
none required?
<!-- Note that we won't merge your changes if you don't add tests -->
**Does this PR introduce a breaking change?**
no
<!-- If this PR introduces a breaking change, please describe the impact and a migration path for existing applications. -->
**What needs to be documented once your changes are merged?**
ModuleFederationPlugin options and their default states
<!-- List all the information that needs to be added to the documentation after merge -->
<!-- When your changes are merged you will be asked to contribute this to the documentation -->
2020-04-14 15:08:33 +02:00
Tobias Koppers
d5c31ab864
Merge branch 'master' into dev-1
2020-04-14 12:48:38 +02:00
Tobias Koppers
b178bfc55a
Fix merge issues
2020-03-18 10:01:20 +01:00
Tobias Koppers
a2601eb5c8
add resolve dependencies to compilation
2020-02-28 17:29:24 +01:00
Tobias Koppers
ddd3745942
move `__webpack_override__` to OverridablesPlugin
2020-02-28 17:22:37 +01:00
Tobias Koppers
ab3bff29df
show container entry and remove override in SourceMap
2020-02-28 17:16:44 +01:00
Tobias Koppers
b5eeb7d67d
add support for nested containers
2020-02-28 17:13:07 +01:00
Tobias Koppers
3ac31e3eee
update formating of container entry
2020-02-28 17:12:36 +01:00
Tobias Koppers
f9385f3ef3
json stringify for string module ids
2020-02-28 16:32:50 +01:00
Tobias Koppers
faa7dda8cd
Add ModuleFederationPlugin and full test case
2020-02-26 23:53:51 +01:00
Tobias Koppers
d102340a3d
cleanup open things
2020-02-26 23:53:44 +01:00
Tobias Koppers
25cd520012
add overridables to ContainerPlugin
2020-02-26 22:38:05 +01:00
Tobias Koppers
95347e17d5
Merge pull request #10445 from ScriptedAlchemy/container-reference-schema-validation
...
ContainerReferencePlugin options validation
2020-02-26 22:37:26 +01:00
Tobias Koppers
d33c0d144e
use new library system in ContainerPlugin
2020-02-26 21:52:58 +01:00
Tobias Koppers
28e16e8b2b
fix linting
2020-02-26 21:14:49 +01:00
ScriptedAlchemy
b3938822c2
adding overrides schema validation
2020-02-26 09:42:23 -08:00
Tobias Koppers
1b46705499
fixes and test
2020-02-26 18:31:48 +01:00
Marais Rossouw
905f2475ff
feat: Adds ContainerPlugin
...
Co-authored-by: Zack Jackson <zackary.l.jackson@gmail.com>
2020-02-26 17:47:15 +01:00
Tobias Koppers
83b7faa67c
get rid of hack for remote override module
2020-02-26 17:16:01 +01:00
Tobias Koppers
7fb423704a
add overrides feature to ContainerReferencePlugin
2020-02-26 16:42:28 +01:00
Tobias Koppers
8792aa0830
add ContainerReferencePlugin
2020-02-26 16:42:24 +01:00
Tobias Koppers
4d2901f21d
load overridables chunks only once
2020-02-24 21:14:58 +01:00
Tobias Koppers
0ca1bc6c5c
move parseOptions into separate module
2020-02-24 21:12:45 +01:00
Tobias Koppers
1c630f1435
add OverridablesPlugin
2020-02-24 15:15:23 +01:00