Skip to content

v1.25.0

Choose a tag to compare

@vovkabelov vovkabelov released this 26 Sep 09:23
· 92 commits to main since this release

В cssImages появилась настройка встраивания для отдельных изображений. Метка ?no-inline в url() отключает встраивание: файл копируется в dist, даже если он меньше maxSize. Метка ?inline, наоборот, встраивает файл при любом размере, в том числе при type: 'copy'. Метка удаляется из итогового URL, остальные параметры сохраняются. Для групп файлов добавлен параметр cssImages.exclude — глоб-маски от корня расширения. SVG со ссылкой на фрагмент (sprite.svg#icon) больше не встраивается: раньше фрагмент терялся и вместо нужной части подставлялся весь файл. Теперь такой файл копируется, а фрагмент в URL сохраняется.


cssImages can now control inlining for individual images. The ?no-inline marker in url() turns inlining off: the file is copied to dist even if it is smaller than maxSize. The ?inline marker does the opposite and inlines the file regardless of its size, including with type: 'copy'. The marker is removed from the resulting URL, other query parameters are kept. For groups of files there is a new cssImages.exclude option with glob patterns relative to the extension root. An SVG referenced with a fragment (sprite.svg#icon) is no longer inlined: previously the fragment was lost and the whole file was embedded instead of the referenced part. Now such a file is copied and the fragment is kept in the URL.