Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/core/src/types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ import type {
CSSLoaderModulesOptions,
CSSLoaderOptions,
HtmlRspackPlugin,
LoosePostCSSPlugin,
PostCSSLoaderOptions,
PostCSSPlugin,
StyleLoaderOptions,
WebpackConfig,
} from './thirdParty';
Expand All @@ -61,7 +61,7 @@ export type ToolsBundlerChainConfig = OneOrMany<

export type ToolsPostCSSLoaderConfig = ConfigChainWithContext<
PostCSSLoaderOptions,
{ addPlugins: (plugins: PostCSSPlugin | PostCSSPlugin[]) => void }
{ addPlugins: (plugins: LoosePostCSSPlugin | LoosePostCSSPlugin[]) => void }
>;

export type ToolsCSSLoaderConfig = ConfigChain<CSSLoaderOptions>;
Expand Down
9 changes: 8 additions & 1 deletion packages/core/src/types/thirdParty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,16 @@ export interface CSSExtractOptions {

export type { WebpackConfig };

/**
* A loose PostCSS plugin type that accepts plugins from different
* PostCSS versions. This helps avoid type conflicts when user
* projects use different PostCSS versions.
*/
export type LoosePostCSSPlugin = any;

export type PostCSSOptions = ProcessOptions & {
config?: boolean;
plugins?: AcceptedPlugin[];
plugins?: LoosePostCSSPlugin[];
};

export type PostCSSLoaderOptions = {
Expand Down
Loading