/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/hotCases/css/mini-css-extract/a.js
25 строк
510 B
Xiao
fix: prevent empty JS file generation for CSS-only entry points (#20454)
16 фев 2026, 16:15
Не верифицирован
16 фев 2026, 16:15
6dec682
Код
Авторство
О чём код?
import "./a.css"; const getFile = name => __non_webpack_require__("fs").readFileSync( __non_webpack_require__("path").join(__dirname, name), "utf-8" ); it("should work", async function (done) { try { const style = getFile("styles.css"); expect(style).toContain("color: red;"); } catch (e) {} NEXT(require("../../update")(done, true, () => { try { const style = getFile("styles.css"); expect(style).toContain("color: blue;"); } catch (e) {} done(); })); }); module.hot.accept();