Merge pull request #3601 from backstage/rugvip/noform

cli: fix for node_modules inside local packages being transformed
This commit is contained in:
Patrik Oldsberg
2020-12-08 12:19:47 +01:00
committed by GitHub
2 changed files with 11 additions and 1 deletions
+6 -1
View File
@@ -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 = [