cli: fix for node_modules inside local packages being transformed
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Fixes a big in the bundling logic that caused `node_modules` inside local monorepo packages to be transformed.
|
||||
@@ -35,7 +35,12 @@ export const transforms = (options: TransformOptions): Transforms => {
|
||||
const extraTransforms = isDev ? ['react-hot-loader'] : [];
|
||||
|
||||
const transformExcludeCondition = {
|
||||
and: [/node_modules/, { not: externalTransforms }],
|
||||
or: [
|
||||
// This makes sure we don't transform node_modules inside any of the local monorepo packages
|
||||
/node_modules.*node_modules/,
|
||||
// This excludes the local monorepo packages from the excludes, meaning they will be transformed
|
||||
{ and: [/node_modules/, { not: externalTransforms }] },
|
||||
],
|
||||
};
|
||||
|
||||
const loaders = [
|
||||
|
||||
Reference in New Issue
Block a user