cli: fix webpack loader file extension checks
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Fixed Webpack loader patterns so that they properly match the file suffix only.
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user