Merge pull request #3601 from backstage/rugvip/noform
cli: fix for node_modules inside local packages being transformed
This commit is contained in:
@@ -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