/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
examples/module-federation/src/index.js
13 строк
589 B
Tobias Koppers
add module-federation example
04 июн 2020, 04:18
04 июн 2020, 04:18
bc723eb
Код
Авторство
О чём код?
// Sharing modules requires that all remotes are initialized // and can provide shared modules to the common scope // As this is an async operation we need an async boundary (import()) // Using modules from remotes is also an async operation // as chunks need to be loaded for the code of the remote module // This also requires an async boundary (import()) // At this point shared modules initialized and remote modules are loaded import("./bootstrap"); // It's possible to place more code here to do stuff on page init // but it can't use any of the shared modules or remote modules.