/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/html/initial-chunk-modulepreload-default/test.js
10 строк
436 B
Alexander Akait
feat: add output.resourceHints (preload / prefetch / modulepreload / preconnect emission) (#21463)
21 июл 2026, 13:46
Не верифицирован
21 июл 2026, 13:46
ece0fcb
Код
Авторство
О чём код?
const fs = require("fs"); const path = require("path"); const page = fs.readFileSync(path.resolve(__dirname, "page.html"), "utf-8"); const head = page.slice(0, page.indexOf("</head>")); it("should default modulepreload on for ESM output without resourceHints set", () => { // The runtime sibling chunk is preloaded automatically (Vite-style ESM default). expect(head).toContain('<link rel="modulepreload" href="runtime.mjs">'); });