@rspack-canary/browser 1.5.8-canary-e350b761-20250924173613 → 1.5.8-canary-15732646-20250926173747

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.
@@ -13,7 +13,7 @@ export declare class RuntimeModule {
13
13
  static STAGE_BASIC: RuntimeModuleStage;
14
14
  static STAGE_ATTACH: RuntimeModuleStage;
15
15
  static STAGE_TRIGGER: RuntimeModuleStage;
16
- static __to_binding(compilation: Compilation, module: RuntimeModule): JsAddingRuntimeModule;
16
+ static __to_binding(module: RuntimeModule): JsAddingRuntimeModule;
17
17
  private _name;
18
18
  private _stage;
19
19
  fullHash: boolean;
@@ -1,8 +1,7 @@
1
1
  import { type BuiltinPlugin, BuiltinPluginName } from "../binding";
2
- import type { Compiler } from "../Compiler";
3
2
  import { RspackBuiltinPlugin } from "./base";
4
3
  export declare class DeterministicChunkIdsPlugin extends RspackBuiltinPlugin {
5
4
  name: BuiltinPluginName;
6
5
  affectedHooks: "compilation";
7
- raw(compiler: Compiler): BuiltinPlugin;
6
+ raw(): BuiltinPlugin;
8
7
  }
@@ -1,8 +1,7 @@
1
1
  import { type BuiltinPlugin, BuiltinPluginName } from "../binding";
2
- import type { Compiler } from "../Compiler";
3
2
  import { RspackBuiltinPlugin } from "./base";
4
3
  export declare class DeterministicModuleIdsPlugin extends RspackBuiltinPlugin {
5
4
  name: BuiltinPluginName;
6
5
  affectedHooks: "compilation";
7
- raw(compiler: Compiler): BuiltinPlugin;
6
+ raw(): BuiltinPlugin;
8
7
  }
@@ -1,10 +1,9 @@
1
1
  import { type BuiltinPlugin, BuiltinPluginName } from "../binding";
2
- import type { Compiler } from "../Compiler";
3
2
  import { RspackBuiltinPlugin } from "./base";
4
3
  export declare class FlagDependencyUsagePlugin extends RspackBuiltinPlugin {
5
4
  private global;
6
5
  name: BuiltinPluginName;
7
6
  affectedHooks: "compilation";
8
7
  constructor(global: boolean);
9
- raw(compiler: Compiler): BuiltinPlugin;
8
+ raw(): BuiltinPlugin;
10
9
  }
@@ -1,10 +1,9 @@
1
1
  import { type BuiltinPlugin, BuiltinPluginName } from "../binding";
2
- import type { Compiler } from "../Compiler";
3
2
  import { RspackBuiltinPlugin } from "./base";
4
3
  export declare class MangleExportsPlugin extends RspackBuiltinPlugin {
5
4
  private deterministic;
6
5
  name: BuiltinPluginName;
7
6
  affectedHooks: "compilation";
8
7
  constructor(deterministic: boolean);
9
- raw(compiler: Compiler): BuiltinPlugin;
8
+ raw(): BuiltinPlugin;
10
9
  }
@@ -1,8 +1,7 @@
1
1
  import { type BuiltinPlugin, BuiltinPluginName } from "../binding";
2
- import type { Compiler } from "../Compiler";
3
2
  import { RspackBuiltinPlugin } from "./base";
4
3
  export declare class ModuleConcatenationPlugin extends RspackBuiltinPlugin {
5
4
  name: BuiltinPluginName;
6
5
  affectedHooks: "compilation";
7
- raw(compiler: Compiler): BuiltinPlugin;
6
+ raw(): BuiltinPlugin;
8
7
  }
@@ -1,8 +1,7 @@
1
1
  import { type BuiltinPlugin, BuiltinPluginName } from "../binding";
2
- import type { Compiler } from "../Compiler";
3
2
  import { RspackBuiltinPlugin } from "./base";
4
3
  export declare class NaturalChunkIdsPlugin extends RspackBuiltinPlugin {
5
4
  name: BuiltinPluginName;
6
5
  affectedHooks: "compilation";
7
- raw(compiler: Compiler): BuiltinPlugin;
6
+ raw(): BuiltinPlugin;
8
7
  }
@@ -1,8 +1,7 @@
1
1
  import { type BuiltinPlugin, BuiltinPluginName } from "../binding";
2
- import type { Compiler } from "../Compiler";
3
2
  import { RspackBuiltinPlugin } from "./base";
4
3
  export declare class NaturalModuleIdsPlugin extends RspackBuiltinPlugin {
5
4
  name: BuiltinPluginName;
6
5
  affectedHooks: "compilation";
7
- raw(compiler: Compiler): BuiltinPlugin;
6
+ raw(): BuiltinPlugin;
8
7
  }
@@ -0,0 +1,9 @@
1
+ export declare const URLPlugin: {
2
+ new (): {
3
+ name: string;
4
+ _args: [];
5
+ affectedHooks: keyof import("..").CompilerHooks | undefined;
6
+ raw(compiler: import("..").Compiler): import("../binding").BuiltinPlugin;
7
+ apply(compiler: import("..").Compiler): void;
8
+ };
9
+ };
@@ -76,6 +76,7 @@ export * from "./SourceMapDevToolPlugin";
76
76
  export * from "./SplitChunksPlugin";
77
77
  export * from "./SubresourceIntegrityPlugin";
78
78
  export * from "./SwcJsMinimizerPlugin";
79
+ export * from "./URLPlugin";
79
80
  export * from "./WarnCaseSensitiveModulesPlugin";
80
81
  export * from "./WebWorkerTemplatePlugin";
81
82
  export * from "./WorkerPlugin";
@@ -727,6 +727,11 @@ export type CssModuleParserOptions = {
727
727
  url?: CssParserUrl;
728
728
  };
729
729
  type ExportsPresence = "error" | "warn" | "auto" | false;
730
+ export type JavascriptParserCommonjsExports = boolean | "skipInEsm";
731
+ export type JavascriptParserCommonjsOption = boolean | {
732
+ /** Controls how CommonJS export mutations are handled. */
733
+ exports?: JavascriptParserCommonjsExports;
734
+ };
730
735
  export type JavascriptParserOptions = {
731
736
  /**
732
737
  * Specifies global mode for dynamic import.
@@ -757,7 +762,7 @@ export type JavascriptParserOptions = {
757
762
  * Enable parsing of new URL() syntax.
758
763
  * @default true
759
764
  * */
760
- url?: "relative" | boolean;
765
+ url?: "relative" | "new-url-relative" | boolean;
761
766
  /**
762
767
  * Enable warnings for full dynamic dependencies
763
768
  * @default true
@@ -795,6 +800,11 @@ export type JavascriptParserOptions = {
795
800
  requireAsExpression?: boolean;
796
801
  requireDynamic?: boolean;
797
802
  requireResolve?: boolean;
803
+ /**
804
+ * CommonJS-specific parser options. `true` enables the default behaviour, `{ exports: 'skipInEsm' }` preserves CommonJS export mutations when executed inside ESM.
805
+ * @default true
806
+ */
807
+ commonjs?: JavascriptParserCommonjsOption;
798
808
  importDynamic?: boolean;
799
809
  /**
800
810
  * Enable magic comments for CommonJS require() expressions.