/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/module/entries-runtime-single/webpack.config.js
45 строк
795 B
Xiao
fix(esm): fix the import of missing dependency chunks (#19782)
11 авг 2025, 14:52
Не верифицирован
11 авг 2025, 14:52
a87f569
Код
Авторство
О чём код?
"use strict"; const EntryPlugin = require("../../../../").EntryPlugin; /** @type {import("../../../../types").Configuration} */ module.exports = () => ({ devtool: false, mode: "development", entry: { main: { import: "./index.js" } }, output: { filename: "[name].mjs", library: { type: "module" } }, target: ["web", "es2020"], experiments: { outputModule: true }, optimization: { minimize: false, runtimeChunk: "single", splitChunks: { cacheGroups: { separate: { test: /separate/, chunks: "all", filename: "separate.mjs", enforce: true }, common: { test: /common/, chunks: "all", filename: "common.mjs", enforce: true } } } }, plugins: [new EntryPlugin(__dirname, "./separate.js", "main")] });