/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/html/source-dependency-loader/webpack.config.js
25 строк
589 B
Alexander Akait
Experimental HTML: parser/generator options, compilation hooks, and fixes (#21441)
19 июл 2026, 23:58
Не верифицирован
19 июл 2026, 23:58
cb904da
Код
Авторство
О чём код?
"use strict"; const path = require("path"); // HTML asset references (`<img src>`, …) are `url` dependencies, so — just like // CSS `@import` uses `dependency: "css-import"` — a loader can be attached to // them through the `dependency` rule condition, here scoped to `.html` issuers. /** @type {import("../../../../").Configuration} */ module.exports = { output: { assetModuleFilename: "[name][ext]" }, module: { rules: [ { dependency: "url", issuer: /\.html$/, use: [path.resolve(__dirname, "dep-loader.js")] } ] }, experiments: { html: true } };