/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/container/reference-hoisting/webpack.config.js
87 строк
2 KB
Alexander Akait
chore: resolve "use strict" TODO (#19705)
16 июл 2025, 17:29
Не верифицирован
16 июл 2025, 17:29
d8690f3
Код
Авторство
О чём код?
"use strict"; const { ModuleFederationPlugin } = require("../../../../").container; /** @type {ConstructorParameters<typeof ModuleFederationPlugin>[0]} */ const common = { name: "container", exposes: { "./ComponentA": { import: "./ComponentA" } }, shared: { react: { version: false, requiredVersion: false } } }; /** @type {import("../../../../").Configuration[]} */ module.exports = [ { entry: { main: "./index.js", other: "./index-2.js" }, output: { filename: "[name].js", uniqueName: "ref-hoist" }, optimization: { runtimeChunk: "single", moduleIds: "named" }, plugins: [ new ModuleFederationPlugin({ runtime: false, library: { type: "commonjs-module" }, filename: "container.js", remotes: { containerA: { external: "./container.js" }, containerB: { external: "../0-container-full/container.js" } }, ...common }) ] }, { entry: { main: "./index.js", other: "./index-2.js" }, experiments: { outputModule: true }, optimization: { runtimeChunk: "single", moduleIds: "named" }, output: { filename: "module/[name].mjs", uniqueName: "ref-hoist-mjs" }, plugins: [ new ModuleFederationPlugin({ runtime: false, library: { type: "module" }, filename: "module/container.mjs", remotes: { containerA: { external: "./container.mjs" }, containerB: { external: "../../0-container-full/module/container.mjs" } }, ...common }) ], target: "node14" } ];