@rspack-canary/browser 1.6.6-canary-6b712371-20251125114142 → 1.6.6-canary-0ca7752a-20251125174427

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.
@@ -540,13 +540,10 @@ export declare enum BuiltinPluginName {
540
540
  SplitChunksPlugin = 'SplitChunksPlugin',
541
541
  RemoveDuplicateModulesPlugin = 'RemoveDuplicateModulesPlugin',
542
542
  ShareRuntimePlugin = 'ShareRuntimePlugin',
543
- SharedUsedExportsOptimizerPlugin = 'SharedUsedExportsOptimizerPlugin',
544
543
  ContainerPlugin = 'ContainerPlugin',
545
544
  ContainerReferencePlugin = 'ContainerReferencePlugin',
546
545
  ProvideSharedPlugin = 'ProvideSharedPlugin',
547
546
  ConsumeSharedPlugin = 'ConsumeSharedPlugin',
548
- CollectSharedEntryPlugin = 'CollectSharedEntryPlugin',
549
- ShareContainerPlugin = 'ShareContainerPlugin',
550
547
  ModuleFederationRuntimePlugin = 'ModuleFederationRuntimePlugin',
551
548
  ModuleFederationManifestPlugin = 'ModuleFederationManifestPlugin',
552
549
  NamedModuleIdsPlugin = 'NamedModuleIdsPlugin',
@@ -1840,11 +1837,6 @@ export interface RawCircularDependencyRspackPluginOptions {
1840
1837
  onEnd?: () => void
1841
1838
  }
1842
1839
 
1843
- export interface RawCollectShareEntryPluginOptions {
1844
- consumes: Array<RawConsumeOptions>
1845
- filename?: string
1846
- }
1847
-
1848
1840
  export interface RawConsumeOptions {
1849
1841
  key: string
1850
1842
  import?: string
@@ -2592,12 +2584,6 @@ export interface RawOptimizationOptions {
2592
2584
  avoidEntryIife: boolean
2593
2585
  }
2594
2586
 
2595
- export interface RawOptimizeSharedConfig {
2596
- shareKey: string
2597
- treeshake: boolean
2598
- usedExports?: Array<string>
2599
- }
2600
-
2601
2587
  export interface RawOptions {
2602
2588
  name?: string
2603
2589
  mode?: undefined | 'production' | 'development' | 'none'
@@ -2834,21 +2820,6 @@ export interface RawRuntimeChunkOptions {
2834
2820
  name: string | ((entrypoint: { name: string }) => string)
2835
2821
  }
2836
2822
 
2837
- export interface RawShareContainerPluginOptions {
2838
- name: string
2839
- request: string
2840
- version: string
2841
- fileName?: string
2842
- library: JsLibraryOptions
2843
- }
2844
-
2845
- export interface RawSharedUsedExportsOptimizerPluginOptions {
2846
- shared: Array<RawOptimizeSharedConfig>
2847
- injectUsedExports?: boolean
2848
- manifestFileName?: string
2849
- statsFileName?: string
2850
- }
2851
-
2852
2823
  export interface RawSizeLimitsPluginOptions {
2853
2824
  assetFilter?: (assetFilename: string) => boolean
2854
2825
  hints?: "error" | "warning"
Binary file
@@ -21,16 +21,6 @@ export type ConsumesConfig = {
21
21
  singleton?: boolean;
22
22
  strictVersion?: boolean;
23
23
  };
24
- export declare function normalizeConsumeShareOptions(consumes: Consumes, shareScope?: string): [string, {
25
- import: string | undefined;
26
- shareScope: string;
27
- shareKey: string;
28
- requiredVersion: string | false | undefined;
29
- strictVersion: boolean;
30
- packageName: string | undefined;
31
- singleton: boolean;
32
- eager: boolean;
33
- }][];
34
24
  export declare class ConsumeSharedPlugin extends RspackBuiltinPlugin {
35
25
  name: BuiltinPluginName;
36
26
  _options: {
@@ -24,20 +24,6 @@ type ProvidesEnhancedExtraConfig = {
24
24
  strictVersion?: boolean;
25
25
  requiredVersion?: false | string;
26
26
  };
27
- export declare function normalizeProvideShareOptions<Enhanced extends boolean = false>(options: Provides<Enhanced>, shareScope?: string, enhanced?: boolean): [string, {
28
- shareKey: string;
29
- version: string | false | undefined;
30
- shareScope: string;
31
- eager: boolean;
32
- } | {
33
- singleton: boolean | undefined;
34
- requiredVersion: string | false | undefined;
35
- strictVersion: boolean | undefined;
36
- shareKey: string;
37
- version: string | false | undefined;
38
- shareScope: string;
39
- eager: boolean;
40
- }][];
41
27
  export declare class ProvideSharedPlugin<Enhanced extends boolean = false> extends RspackBuiltinPlugin {
42
28
  name: BuiltinPluginName;
43
29
  _provides: [string, Omit<RawProvideOptions, "key">][];
@@ -19,35 +19,7 @@ export type SharedConfig = {
19
19
  singleton?: boolean;
20
20
  strictVersion?: boolean;
21
21
  version?: false | string;
22
- treeshake?: boolean;
23
- usedExports?: string[];
24
- independentShareFileName?: string;
25
22
  };
26
- export type NormalizedSharedOptions = [string, SharedConfig][];
27
- export declare function normalizeSharedOptions(shared: Shared): NormalizedSharedOptions;
28
- export declare function createProvideShareOptions(normalizedSharedOptions: NormalizedSharedOptions): {
29
- [x: string]: {
30
- shareKey: string;
31
- shareScope: string | undefined;
32
- version: string | false | undefined;
33
- eager: boolean | undefined;
34
- singleton: boolean | undefined;
35
- requiredVersion: string | false | undefined;
36
- strictVersion: boolean | undefined;
37
- };
38
- }[];
39
- export declare function createConsumeShareOptions(normalizedSharedOptions: NormalizedSharedOptions): {
40
- [x: string]: {
41
- import: string | false | undefined;
42
- shareKey: string;
43
- shareScope: string | undefined;
44
- requiredVersion: string | false | undefined;
45
- strictVersion: boolean | undefined;
46
- singleton: boolean | undefined;
47
- packageName: string | undefined;
48
- eager: boolean | undefined;
49
- };
50
- }[];
51
23
  export declare class SharePlugin {
52
24
  _shareScope: string | undefined;
53
25
  _consumes: {
@@ -74,7 +46,6 @@ export declare class SharePlugin {
74
46
  };
75
47
  }[];
76
48
  _enhanced: boolean;
77
- _sharedOptions: NormalizedSharedOptions;
78
49
  constructor(options: SharePluginOptions);
79
50
  apply(compiler: Compiler): void;
80
51
  }
@@ -1,2 +1 @@
1
1
  export declare function isRequiredVersion(str: string): boolean;
2
- export declare const encodeName: (name: string, prefix?: string, withExt?: boolean) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack-canary/browser",
3
- "version": "1.6.6-canary-6b712371-20251125114142",
3
+ "version": "1.6.6-canary-0ca7752a-20251125174427",
4
4
  "webpackVersion": "5.75.0",
5
5
  "license": "MIT",
6
6
  "description": "Rspack for running in the browser. This is still in early stage and may not follow the semver.",
@@ -1,22 +0,0 @@
1
- import { type BuiltinPlugin, BuiltinPluginName } from "../binding";
2
- import { RspackBuiltinPlugin } from "../builtin-plugin/base";
3
- import type { Compiler } from "../Compiler";
4
- import { type NormalizedSharedOptions } from "./SharePlugin";
5
- export type CollectSharedEntryPluginOptions = {
6
- sharedOptions: NormalizedSharedOptions;
7
- shareScope?: string;
8
- };
9
- export type ShareRequestsMap = Record<string, {
10
- shareScope: string;
11
- requests: [string, string][];
12
- }>;
13
- export declare class CollectSharedEntryPlugin extends RspackBuiltinPlugin {
14
- name: BuiltinPluginName;
15
- sharedOptions: NormalizedSharedOptions;
16
- private _collectedEntries;
17
- constructor(options: CollectSharedEntryPluginOptions);
18
- getData(): ShareRequestsMap;
19
- getFilename(): string;
20
- apply(compiler: Compiler): void;
21
- raw(): BuiltinPlugin;
22
- }
@@ -1,37 +0,0 @@
1
- import type { Compiler } from "../Compiler";
2
- import type { LibraryOptions, Plugins } from "../config";
3
- import { type ModuleFederationManifestPluginOptions } from "../container/ModuleFederationManifestPlugin";
4
- import type { Shared, SharedConfig } from "./SharePlugin";
5
- export type MakeRequired<T, K extends keyof T> = Required<Pick<T, K>> & Omit<T, K>;
6
- export interface IndependentSharePluginOptions {
7
- name: string;
8
- shared: Shared;
9
- library?: LibraryOptions;
10
- outputDir?: string;
11
- outputFilePath?: string;
12
- plugins?: Plugins;
13
- treeshake?: boolean;
14
- manifest?: ModuleFederationManifestPluginOptions;
15
- injectUsedExports?: boolean;
16
- }
17
- export type ShareFallback = Record<string, [string, string, string][]>;
18
- export declare class IndependentSharedPlugin {
19
- mfName: string;
20
- shared: Shared;
21
- library?: LibraryOptions;
22
- sharedOptions: [string, SharedConfig][];
23
- outputDir: string;
24
- outputFilePath?: string;
25
- plugins: Plugins;
26
- compilers: Map<string, Compiler>;
27
- treeshake?: boolean;
28
- manifest?: ModuleFederationManifestPluginOptions;
29
- buildAssets: ShareFallback;
30
- injectUsedExports?: boolean;
31
- name: string;
32
- constructor(options: IndependentSharePluginOptions);
33
- apply(compiler: Compiler): void;
34
- private createIndependentCompilers;
35
- private createIndependentCompiler;
36
- private cleanup;
37
- }
@@ -1,23 +0,0 @@
1
- import { type BuiltinPlugin, BuiltinPluginName, type RawShareContainerPluginOptions } from "../binding";
2
- import { RspackBuiltinPlugin } from "../builtin-plugin/base";
3
- import type { Compiler } from "../Compiler";
4
- import type { LibraryOptions } from "../config";
5
- export type ShareContainerPluginOptions = {
6
- mfName: string;
7
- shareName: string;
8
- version: string;
9
- request: string;
10
- library?: LibraryOptions;
11
- independentShareFileName?: string;
12
- };
13
- export declare class ShareContainerPlugin extends RspackBuiltinPlugin {
14
- name: BuiltinPluginName;
15
- filename: string;
16
- _options: RawShareContainerPluginOptions;
17
- _shareName: string;
18
- _globalName: string;
19
- constructor(options: ShareContainerPluginOptions);
20
- getData(): string[];
21
- raw(compiler: Compiler): BuiltinPlugin;
22
- apply(compiler: Compiler): void;
23
- }
@@ -1,14 +0,0 @@
1
- import type { BuiltinPlugin } from "../binding";
2
- import { BuiltinPluginName } from "../binding";
3
- import { RspackBuiltinPlugin } from "../builtin-plugin/base";
4
- import { type ModuleFederationManifestPluginOptions } from "../container/ModuleFederationManifestPlugin";
5
- import type { SharedConfig } from "./SharePlugin";
6
- export declare class SharedUsedExportsOptimizerPlugin extends RspackBuiltinPlugin {
7
- name: BuiltinPluginName;
8
- private sharedOptions;
9
- private injectUsedExports;
10
- private manifestOptions;
11
- constructor(sharedOptions: [string, SharedConfig][], injectUsedExports?: boolean, manifestOptions?: ModuleFederationManifestPluginOptions);
12
- private buildOptions;
13
- raw(): BuiltinPlugin | undefined;
14
- }
@@ -1,19 +0,0 @@
1
- import type { Compiler } from "../Compiler";
2
- import type { Plugins } from "../config";
3
- import type { ModuleFederationPluginOptions } from "../container/ModuleFederationPlugin";
4
- export interface TreeshakeSharedPluginOptions {
5
- mfConfig: ModuleFederationPluginOptions;
6
- plugins?: Plugins;
7
- reshake?: boolean;
8
- }
9
- export declare class TreeShakeSharedPlugin {
10
- mfConfig: ModuleFederationPluginOptions;
11
- outputDir: string;
12
- plugins?: Plugins;
13
- reshake?: boolean;
14
- private _independentSharePlugin?;
15
- name: string;
16
- constructor(options: TreeshakeSharedPluginOptions);
17
- apply(compiler: Compiler): void;
18
- get buildAssets(): import("./IndependentSharedPlugin").ShareFallback;
19
- }