Skip to content

Commit 72c84aa

Browse files
authored
fix(types): loosen plugin apply type to support older versions (#5842)
1 parent db6fb08 commit 72c84aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/core/src/types/plugin.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,8 @@ export type RsbuildPlugin = {
261261
// Rsbuild core without throwing type mismatches. In most cases, Rsbuild core
262262
// only adds new methods or properties to the API object, which means that lower
263263
// version plugins will usually work fine.
264-
type LooseRsbuildPlugin = Omit<RsbuildPlugin, 'setup'> & {
264+
type LooseRsbuildPlugin = Omit<RsbuildPlugin, 'setup' | 'apply'> & {
265+
apply?: any;
265266
setup: (api: any) => MaybePromise<void>;
266267
};
267268

0 commit comments

Comments
 (0)