Merge pull request #23185 from StephenAWilson/ico-file-support

add import support for Ico files
This commit is contained in:
Patrik Oldsberg
2024-02-23 20:33:42 +01:00
committed by GitHub
4 changed files with 12 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Add .ico import support
+5
View File
@@ -55,6 +55,11 @@ declare module '*.webp' {
export default src;
}
declare module '*.ico' {
const src: string;
export default src;
}
declare module '*.yaml' {
const src: string;
export default src;
+1 -1
View File
@@ -185,7 +185,7 @@ async function getProjectConfig(targetPath, extraConfig) {
},
},
],
'\\.(bmp|gif|jpg|jpeg|png|frag|xml|svg|eot|woff|woff2|ttf)$':
'\\.(bmp|gif|jpg|jpeg|png|ico|frag|xml|svg|eot|woff|woff2|ttf)$':
require.resolve('./jestFileTransform.js'),
'\\.(yaml)$': require.resolve('./jestYamlTransform'),
},
@@ -145,6 +145,7 @@ export const transforms = (options: TransformOptions): Transforms => {
/\.vert$/,
{ and: [/\.svg$/, { not: [/\.icon\.svg$/] }] },
/\.xml$/,
/\.ico$/,
],
type: 'asset/resource',
generator: {