/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/css/css-modules/index-global.js
26 строк
765 B
Xiao
feat: support CSS text/css-style-sheet exportType module concatenation (#20851)
04 май 2026, 19:40
Не верифицирован
04 май 2026, 19:40
3374804
Код
Авторство
О чём код?
const prod = process.env.NODE_ENV === "production"; it("should allow to create css modules", done => { import("./use-style-global.js").then(({ default: x }) => { try { expect(x).toMatchSnapshot(prod ? "global prod" : "global dev"); const fs = __non_webpack_require__("fs"); const path = __non_webpack_require__("path"); if (__STATS_I__ === 4 || __STATS_I__ === 5) { const cssOutputFilename = prod ? `244.bundle${__STATS_I__}.css` : `use-style-global_js.bundle${__STATS_I__}.css`; const cssContent = fs.readFileSync( path.join(__dirname, cssOutputFilename), "utf-8" ); expect(cssContent).toMatchSnapshot(prod ? "global prod" : "global dev"); } } catch (e) { return done(e); } done(); }, done); });