Skip to content

Commit a2a1ab1

Browse files
Apply suggested changes
Apply suggested changes
1 parent 80f510a commit a2a1ab1

File tree

3 files changed

+4
-16
lines changed

3 files changed

+4
-16
lines changed

packages/enhanced/src/lib/sharing/SharePlugin.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,7 @@ class SharePlugin {
5757
};
5858
return config;
5959
},
60-
(item, key) => {
61-
// Enhanced validation for shared config
62-
if (item.include && item.exclude) {
63-
throw new Error(
64-
`Cannot specify both include and exclude filters for shared module "${key}"`,
65-
);
66-
}
67-
return item;
68-
},
60+
(item) => item,
6961
);
7062
const consumes: Record<string, ConsumesConfig>[] = sharedOptions.map(
7163
([key, options]) => ({

packages/enhanced/test/compiler-unit/sharing/SharePlugin.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,7 @@ describe('SharePlugin Compiler Integration', () => {
284284
},
285285
},
286286
});
287-
}).toThrow(
288-
'Cannot specify both include and exclude filters for shared module "react"',
289-
);
287+
}).not.toThrow();
290288
});
291289
});
292290
});

packages/enhanced/test/unit/sharing/SharePlugin.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ describe('SharePlugin', () => {
5252
}).not.toThrow();
5353
});
5454

55-
it('should throw error for conflicting include/exclude filters', () => {
55+
it('should allow both include and exclude filters together', () => {
5656
expect(() => {
5757
new SharePlugin({
5858
shared: {
@@ -62,9 +62,7 @@ describe('SharePlugin', () => {
6262
},
6363
},
6464
});
65-
}).toThrow(
66-
'Cannot specify both include and exclude filters for shared module "react"',
67-
);
65+
}).not.toThrow();
6866
});
6967

7068
it('should initialize with string shareScope', () => {

0 commit comments

Comments
 (0)