Merge pull request #27412 from Antolius/master

Fix .webp imports by expanding webpack loader config
This commit is contained in:
Patrik Oldsberg
2024-11-04 09:57:56 +01:00
committed by GitHub
4 changed files with 8 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Added support for `.webp` files in the frontend tooling.
+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'),
},
+1
View File
@@ -167,6 +167,7 @@ export async function makeRollupConfigs(
/\.gif$/,
/\.jpg$/,
/\.jpeg$/,
/\.webp$/,
/\.eot$/,
/\.woff$/,
/\.woff2$/,
@@ -150,6 +150,7 @@ export const transforms = (options: TransformOptions): Transforms => {
{ and: [/\.svg$/, { not: [/\.icon\.svg$/] }] },
/\.xml$/,
/\.ico$/,
/\.webp$/,
],
type: 'asset/resource',
generator: {