/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/css/pathinfo/test.config.js
32 строки
799 B
Alexander Akait
chore: resolve "use strict" TODO (#19705)
16 июл 2025, 17:29
Не верифицирован
16 июл 2025, 17:29
d8690f3
Код
Авторство
О чём код?
"use strict"; const fs = require("fs"); const path = require("path"); module.exports = { moduleScope(scope) { const link = scope.window.document.createElement("link"); link.rel = "stylesheet"; link.href = "bundle0.css"; scope.window.document.head.appendChild(link); }, findBundle(i, options) { const source = fs.readFileSync( path.resolve(options.output.path, "bundle0.css"), "utf8" ); if ( !source.includes(`/*!********************************!*\\ !*** css ./style-imported.css ***! \\********************************/`) && !source.includes(`/*!***********************!*\\ !*** css ./style.css ***! \\***********************/`) ) { throw new Error("The `pathinfo` option doesn't work."); } return ["./style2_css.bundle0.js", "./bundle0.js"]; } };