/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/hotCases/css/mini-css-extract/webpack.config.js
48 строк
768 B
Xiao
fix: prevent empty JS file generation for CSS-only entry points (#20454)
16 фев 2026, 16:15
Не верифицирован
16 фев 2026, 16:15
6dec682
Код
Авторство
О чём код?
"use strict"; const MiniCssPlugin = require("mini-css-extract-plugin"); /** @type {import("../../../../").Configuration} */ module.exports = { mode: "development", devtool: false, entry: { main: "./a.js", b: { import: "./b.js", dependOn: "main" } }, module: { rules: [ { test: /\.css$/, use: [ { loader: MiniCssPlugin.loader }, { loader: "css-loader", options: { esModule: true, modules: { namedExport: false, localIdentName: "[name]" } } } ] } ] }, output: { filename: "[name].js", cssChunkFilename: "[name].css" }, target: "web", node: { __dirname: false }, plugins: [ new MiniCssPlugin({ experimentalUseImportModule: true }) ] };