From c45ccb6c1dd6871046739b88f56c479763e05cf6 Mon Sep 17 00:00:00 2001 From: Andrey Polischuk Date: Tue, 17 Oct 2023 23:39:06 +0300 Subject: [PATCH] fix(css): ignore base64 images in styles --- packages/css/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/css/index.js b/packages/css/index.js index 0d0eced..bfe3013 100644 --- a/packages/css/index.js +++ b/packages/css/index.js @@ -55,7 +55,15 @@ module.exports = () => ({ vendorCSSLoaders = [ MiniCssExtractPlugin.loader, - 'css-loader', + { + loader: 'css-loader', + options: { + url: { + // NOTE: игнорируем загрузку base64 изображений в стилях + filter: (url) => !/^data:image/.test(url) + } + } + }, 'postcss-loader' ] }