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

feat: export Chunk and Module types from @rspack/core #6421

Merged
merged 1 commit into from
May 6, 2024
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
6 changes: 4 additions & 2 deletions packages/rspack/etc/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ type CallFn = (...args: any[]) => any;
type CallFn_2<D> = (args: D[]) => void;

// @public (undocumented)
class Chunk {
export class Chunk {
constructor(chunk: JsChunk, compilation: JsCompilation);
// (undocumented)
static __from_binding(chunk: JsChunk, compilation: Compilation): Chunk;
Expand Down Expand Up @@ -4920,7 +4920,7 @@ export type Mode = z.infer<typeof mode>;
const mode: z.ZodEnum<["development", "production", "none"]>;

// @public (undocumented)
class Module {
export class Module {
constructor(module: JsModule);
// (undocumented)
static __from_binding(module: JsModule): Module;
Expand Down Expand Up @@ -7875,8 +7875,10 @@ declare namespace rspackExports {
StatsModule,
StatsWarnings,
MultiStats,
Chunk,
ChunkGroup,
NormalModuleFactory,
Module,
NormalModule,
ModuleFilenameHelpers,
Template,
Expand Down
3 changes: 3 additions & 0 deletions packages/rspack/src/exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ export type {

export { MultiStats } from "./MultiStats";

export type { Chunk } from "./Chunk";
export type { ChunkGroup } from "./ChunkGroup";

export type { NormalModuleFactory } from "./NormalModuleFactory";

export type { Module } from "./Module";

export { NormalModule } from "./NormalModule";

// API extractor not working with some re-exports, see: https://github.com/microsoft/fluentui/issues/20694
Expand Down
Loading