fix(ideal-image): Add issuer to ideal-image Webpack loader (#10910)

This commit is contained in:
Sébastien Lorber 2025-02-06 14:13:46 +01:00 committed by GitHub
parent 3fde4a0d6a
commit cd2792775e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 30 additions and 1 deletions

View file

@ -54,6 +54,12 @@ export default function pluginIdealImage(
rules: [
{
test: /\.(?:png|jpe?g)$/i,
// We don't want to use the image loader for non-React source code
// ie we don't want to use ideal image loader for CSS files...
// See https://github.com/facebook/docusaurus/issues/10862
issuer: {
and: [/\.(?:tsx?|jsx?|mdx?)$/i],
},
use: [
require.resolve('@docusaurus/lqip-loader'),
{