cli: fix webpack loader file extension checks

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-02-11 14:39:17 +01:00
parent e8f2ac13e7
commit a9c50af76b
2 changed files with 10 additions and 4 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Fixed Webpack loader patterns so that they properly match the file suffix only.
+5 -4
View File
@@ -107,7 +107,7 @@ export const transforms = (options: TransformOptions): Transforms => {
],
},
{
test: /\.(js|mjs|cjs)/,
test: /\.(js|mjs|cjs)$/,
resolve: {
fullySpecified: false,
},
@@ -141,9 +141,10 @@ export const transforms = (options: TransformOptions): Transforms => {
/\.gif$/,
/\.jpe?g$/,
/\.png$/,
/\.frag/,
{ and: [/\.svg/, { not: [/\.icon\.svg/] }] },
/\.xml/,
/\.frag$/,
/\.vert$/,
{ and: [/\.svg$/, { not: [/\.icon\.svg$/] }] },
/\.xml$/,
],
type: 'asset/resource',
generator: {