/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/vips/src/loader.ts
18 строк
795 B
Adam Silverstein
Create sub-sized images (#74566)
14 фев 2026, 17:24
Не верифицирован
14 фев 2026, 17:24
2453663
Код
Авторство
О чём код?
/** * Loader for the @wordpress/vips/worker module. * * This tiny module exists so that WordPress can discover @wordpress/vips/worker * as a dynamic module dependency and include it in the import map. Without this, * the dynamic import() call in @wordpress/upload-media's IIFE bundle cannot * resolve the module URL at runtime. * * The loader is enqueued on block editor pages via wp_enqueue_script_module() * in lib/client-assets.php. The heavy vips/worker module (~3.8MB of inlined WASM) * is only fetched when image processing is actually triggered. * * @see packages/upload-media/src/store/utils/vips.ts — the consumer * @see packages/latex-to-mathml/src/loader.ts — the reference pattern */ export default function loader() { return import( '@wordpress/vips/worker' ); }