/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/hotCases/loader-import-module/css/webpack.config.js
44 строки
895 B
Alexander Akait
style: set `arrowParens` to `true` (#19706)
16 июл 2025, 19:13
Не верифицирован
16 июл 2025, 19:13
703d9ac
Код
Авторство
О чём код?
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { module: { generator: { asset: { filename: "assets/[name][ext]" } }, rules: [ { oneOf: [ { test: /\.css\.js$/, use: "./loader", type: "asset/source" }, { test: /\.(js|jpg|png)$/ }, { type: "asset/resource" } ] } ] }, plugins: [ (compiler) => compiler.hooks.done.tap("test case", (stats) => { const png = stats.compilation.getAsset("assets/file.png"); const jpg = stats.compilation.getAsset("assets/file.jpg"); if (png) { expect(jpg).toBeUndefined(); expect(png).toHaveProperty( "info", expect.objectContaining({ sourceFilename: "file.png" }) ); } else { expect(jpg).toHaveProperty( "info", expect.objectContaining({ sourceFilename: "file.jpg" }) ); } }) ] };