Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(rspack): claim plugin statsResourceInfo type #3427

Closed
wants to merge 1 commit into from
Closed
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
5 changes: 5 additions & 0 deletions .changeset/wet-deers-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@module-federation/rspack': patch
---

chore(rspack): claim plugin statsResourceInfo type
14 changes: 8 additions & 6 deletions packages/rspack/src/ModuleFederationPlugin.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
import type {
Compiler,
ModuleFederationPluginOptions,
RspackPluginInstance,
} from '@rspack/core';
import {
composeKeyWithSeparator,
moduleFederationPlugin,
Expand All @@ -14,6 +9,13 @@ import ReactBridgePlugin from '@module-federation/bridge-react-webpack-plugin';
import path from 'node:path';
import fs from 'node:fs';

import type { ResourceInfo } from '@module-federation/manifest';
import type {
Compiler,
ModuleFederationPluginOptions,
RspackPluginInstance,
} from '@rspack/core';

type ExcludeFalse<T> = T extends undefined | false ? never : T;
type SplitChunks = Compiler['options']['optimization']['splitChunks'];
type NonUndefined<T = SplitChunks> = ExcludeFalse<T>;
Expand Down Expand Up @@ -240,7 +242,7 @@ export class ModuleFederationPlugin implements RspackPluginInstance {
});
}

get statsResourceInfo() {
get statsResourceInfo(): Partial<ResourceInfo> | undefined {
return this._statsPlugin?.resourceInfo;
}
}
Loading