@rspack/core 1.2.0-alpha.0 → 1.2.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -234,15 +234,6 @@ export declare class Compilation {
234
234
  */
235
235
  get namedChunks(): ReadonlyMap<string, Readonly<Chunk>>;
236
236
  get entries(): Map<string, EntryData>;
237
- /**
238
- * Note: This is not a webpack public API, maybe removed in future.
239
- *
240
- * @internal
241
- */
242
- __internal__getCustomModule(moduleIdentifier: string): {
243
- buildInfo: Record<string, unknown>;
244
- buildMeta: Record<string, unknown>;
245
- };
246
237
  getCache(name: string): import("./lib/CacheFacade").CacheFacade;
247
238
  createStatsOptions(statsValue: StatsValue | undefined, context?: CreateStatsOptionsContext): NormalizedStatsOptions;
248
239
  createStatsFactory(options: StatsOptions): StatsFactory;
package/dist/Module.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import type { JsCodegenerationResult, JsContextModuleFactoryAfterResolveData, JsContextModuleFactoryBeforeResolveData, JsCreateData, JsFactoryMeta } from "@rspack/binding";
2
- import { JsModule } from "@rspack/binding";
2
+ import type { JsModule } from "@rspack/binding";
3
3
  import type { Source } from "../compiled/webpack-sources";
4
- import type { Compilation } from "./Compilation";
5
4
  import { DependenciesBlock } from "./DependenciesBlock";
6
5
  import { Dependency } from "./Dependency";
7
6
  export type ResourceData = {
@@ -64,22 +63,20 @@ export declare class Module {
64
63
  /**
65
64
  * Records the dynamically added fields for Module on the JavaScript side.
66
65
  * These fields are generally used within a plugin, so they do not need to be passed back to the Rust side.
67
- * @see {@link Compilation#customModules}
68
66
  */
69
- readonly buildInfo: Record<string, any>;
67
+ buildInfo: Record<string, any>;
70
68
  /**
71
69
  * Records the dynamically added fields for Module on the JavaScript side.
72
70
  * These fields are generally used within a plugin, so they do not need to be passed back to the Rust side.
73
- * @see {@link Compilation#customModules}
74
71
  */
75
- readonly buildMeta: Record<string, any>;
72
+ buildMeta: Record<string, any>;
76
73
  readonly modules: Module[] | undefined;
77
74
  readonly blocks: DependenciesBlock[];
78
75
  readonly dependencies: Dependency[];
79
76
  readonly useSourceMap: boolean;
80
- static __from_binding(binding: JsModule, compilation?: Compilation): Module;
77
+ static __from_binding(binding: JsModule): Module;
81
78
  static __to_binding(module: Module): JsModule;
82
- constructor(module: JsModule, compilation?: Compilation);
79
+ constructor(module: JsModule);
83
80
  originalSource(): Source | null;
84
81
  identifier(): string;
85
82
  nameForCondition(): string | null;
@@ -11,6 +11,7 @@ export interface CssExtractRspackPluginOptions {
11
11
  linkType?: string | "text/css" | false;
12
12
  runtime?: boolean;
13
13
  pathinfo?: boolean;
14
+ enforceRelative?: boolean;
14
15
  }
15
16
  export declare class CssExtractRspackPlugin {
16
17
  static pluginName: string;
@@ -966,7 +966,7 @@ export type ExternalItemFunctionData = {
966
966
  * }
967
967
  * ```
968
968
  * */
969
- export type ExternalItem = string | RegExp | ExternalItemObjectUnknown | ((data: ExternalItemFunctionData, callback: (err?: Error, result?: ExternalItemValue, type?: ExternalsType) => void) => void) | ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>);
969
+ export type ExternalItem = string | RegExp | ExternalItemObjectUnknown | ((data: ExternalItemFunctionData) => ExternalItemValue) | ((data: ExternalItemFunctionData, callback: (err?: Error, result?: ExternalItemValue, type?: ExternalsType) => void) => void) | ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>);
970
970
  /**
971
971
  * Prevent bundling of certain imported packages and instead retrieve these external dependencies at runtime.
972
972
  *