Fix .webp imports by expanding webpack loader config
Signed-off-by: Josip Antoliš <josip.antolis@protonmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Fix .webp import support by adding it to webpack loader config.
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user