/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/css/dynamic-import-css-preload/webpack.config.js
30 строк
734 B
Alexander Akait
feat: add output.resourceHints (preload / prefetch / modulepreload / preconnect emission) (#21463)
21 июл 2026, 13:46
Не верифицирован
21 июл 2026, 13:46
ece0fcb
Код
Авторство
О чём код?
"use strict"; // `parser.javascript.dynamicImportCssPreload: true` auto-emits // `<link rel="preload" as="style">` for a dynamically imported chunk's CSS // (fetched in parallel with the chunk), without preloading its JavaScript. /** @type {import("../../../../").Configuration} */ module.exports = { entry: "./index.mjs", experiments: { outputModule: true, css: true }, target: "web", output: { publicPath: "https://example.com/public/path/", module: true, filename: "bundle0.mjs", chunkFilename: "[name].mjs", chunkFormat: "module" }, module: { parser: { javascript: { dynamicImportCssPreload: true } } }, performance: { hints: false }, optimization: { minimize: false, chunkIds: "named" } };