Fix .webp imports by expanding webpack loader config

Signed-off-by: Josip Antoliš <josip.antolis@protonmail.com>
This commit is contained in:
Josip Antoliš
2024-10-31 13:59:25 +01:00
parent d02e2dd8a4
commit e565f73e56
3 changed files with 7 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Fix .webp import support by adding it to webpack loader config.
+1 -1
View File
@@ -213,7 +213,7 @@ async function getProjectConfig(targetPath, extraConfig, extraOptions) {
},
},
],
'\\.(bmp|gif|jpg|jpeg|png|ico|frag|xml|svg|eot|woff|woff2|ttf)$':
'\\.(bmp|gif|jpg|jpeg|png|ico|webp|frag|xml|svg|eot|woff|woff2|ttf)$':
require.resolve('./jestFileTransform.js'),
'\\.(yaml)$': require.resolve('./jestYamlTransform'),
},
@@ -150,6 +150,7 @@ export const transforms = (options: TransformOptions): Transforms => {
{ and: [/\.svg$/, { not: [/\.icon\.svg$/] }] },
/\.xml$/,
/\.ico$/,
/\.webp$/,
],
type: 'asset/resource',
generator: {