/
eb
/
microfrontend-example
Обзор
Документация
Войти
/
eb
/
microfrontend-example
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
cart/webpack.config.js
27 строк
707 B
Evgeniy Budaev
Refactoring Cart
03 сен 2021, 05:16
03 сен 2021, 05:16
37f8878
Код
Авторство
О чём код?
const HtmlWebpackPlugin = require("html-webpack-plugin"); const ModuleFederationPlugin = require("webpack/lib/container/ModuleFederationPlugin"); module.exports = { mode: "development", devServer: { port: 8082, }, plugins: [ new ModuleFederationPlugin({ name: "cart", filename: "remoteEntry.js", exposes: { "./CartShow": "./src/bootstrap" }, shared: ["faker"], // shared: { // faker: { // singleton: true, // Разрешена только одна версия общего модуля или shared: ["faker"] // }, // }, }), new HtmlWebpackPlugin({ template: "./public/index.html" }) ] };