/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/layer/define-single-entry/webpack.config.js
37 строк
672 B
Alexander Akait
style: set `arrowParens` to `true` (#19706)
16 июл 2025, 19:13
Не верифицирован
16 июл 2025, 19:13
703d9ac
Код
Авторство
О чём код?
"use strict"; const { DefinePlugin } = require("../../../../"); /** @type {import("../../../../").Configuration} */ module.exports = { entry: { paid: { import: "./main.js", layer: "paid" }, free: { import: "./main.js", layer: "free" } }, experiments: { layers: true }, optimization: { splitChunks: { cacheGroups: { layerPaidCommon: { name: "layer-paid-common", layer: "paid", chunks: "async", enforce: true, reuseExistingChunk: true } } } }, output: { filename: "[name].js" }, plugins: [ new DefinePlugin({ FREE_VERSION: DefinePlugin.runtimeValue( (ctx) => ctx.module.layer === "free" ) }) ] };