@rspack-debug/browser 2.0.0-canary.20260120 → 2.0.0-rc.2

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.
Files changed (56) hide show
  1. package/dist/Compilation.d.ts +3 -0
  2. package/dist/Compiler.d.ts +1 -0
  3. package/dist/FileSystem.d.ts +1 -1
  4. package/dist/ModuleGraph.d.ts +3 -1
  5. package/dist/ModuleGraphConnection.d.ts +10 -0
  6. package/dist/NormalModule.d.ts +0 -1
  7. package/dist/RuntimeGlobals.d.ts +1 -1
  8. package/dist/browser/BrowserRequirePlugin.d.ts +1 -1
  9. package/dist/browser/fs.d.ts +1 -1
  10. package/dist/builtin-loader/swc/pluginImport.d.ts +1 -1
  11. package/dist/builtin-loader/swc/types.d.ts +36 -1
  12. package/dist/builtin-plugin/EsmLibraryPlugin.d.ts +4 -2
  13. package/dist/builtin-plugin/EsmNodeTargetPlugin.d.ts +9 -0
  14. package/dist/builtin-plugin/HashedModuleIdsPlugin.d.ts +10 -0
  15. package/dist/builtin-plugin/ProgressPlugin.d.ts +5 -4
  16. package/dist/builtin-plugin/RsdoctorPlugin.d.ts +2 -2
  17. package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +9 -9
  18. package/dist/builtin-plugin/SplitChunksPlugin.d.ts +2 -1
  19. package/dist/builtin-plugin/WorkerPlugin.d.ts +1 -0
  20. package/dist/builtin-plugin/index.d.ts +3 -0
  21. package/dist/builtin-plugin/lazy-compilation/middleware.d.ts +3 -3
  22. package/dist/builtin-plugin/rsc/Coordinator.d.ts +8 -0
  23. package/dist/builtin-plugin/rsc/RscClientPlugin.d.ts +13 -0
  24. package/dist/builtin-plugin/rsc/RscServerPlugin.d.ts +39 -0
  25. package/dist/builtin-plugin/rsc/index.d.ts +24 -0
  26. package/dist/checkNodeVersion.d.ts +1 -0
  27. package/dist/config/adapterRuleUse.d.ts +1 -1
  28. package/dist/config/devServer.d.ts +102 -237
  29. package/dist/config/normalization.d.ts +4 -4
  30. package/dist/config/types.d.ts +184 -71
  31. package/dist/container/ContainerPlugin.d.ts +3 -2
  32. package/dist/container/ContainerReferencePlugin.d.ts +4 -3
  33. package/dist/container/ModuleFederationManifestPlugin.d.ts +10 -3
  34. package/dist/container/ModuleFederationPlugin.d.ts +20 -1
  35. package/dist/container/ModuleFederationPluginV1.d.ts +2 -2
  36. package/dist/container/ModuleFederationRuntimePlugin.d.ts +4 -0
  37. package/dist/exports.d.ts +16 -7
  38. package/dist/index.d.ts +2 -1
  39. package/dist/index.js +11541 -7053
  40. package/dist/napi-binding.d.ts +254 -94
  41. package/dist/rspack.wasi-browser.js +15 -3
  42. package/dist/sharing/CollectSharedEntryPlugin.d.ts +22 -0
  43. package/dist/sharing/ConsumeSharedPlugin.d.ts +16 -3
  44. package/dist/sharing/IndependentSharedPlugin.d.ts +35 -0
  45. package/dist/sharing/ProvideSharedPlugin.d.ts +22 -2
  46. package/dist/sharing/SharePlugin.d.ts +43 -5
  47. package/dist/sharing/SharedContainerPlugin.d.ts +23 -0
  48. package/dist/sharing/SharedUsedExportsOptimizerPlugin.d.ts +14 -0
  49. package/dist/sharing/TreeShakingSharedPlugin.d.ts +16 -0
  50. package/dist/sharing/utils.d.ts +1 -0
  51. package/dist/swc.d.ts +1 -1
  52. package/dist/util/createHash.d.ts +1 -1
  53. package/dist/util/supportsColor.d.ts +6 -0
  54. package/dist/wasi-worker-browser.mjs +10300 -6050
  55. package/package.json +6 -4
  56. package/dist/rslib-runtime.js +0 -68
package/dist/exports.d.ts CHANGED
@@ -1,13 +1,12 @@
1
1
  declare const rspackVersion: string;
2
2
  declare const version: string;
3
- export { rspackVersion, version };
4
3
  export type { Asset, AssetInfo, Assets, ChunkPathData, CompilationParams, LogEntry, PathData, } from './Compilation';
5
4
  export { Compilation } from './Compilation';
6
5
  export { Compiler, type CompilerHooks } from './Compiler';
7
6
  export type { MultiCompilerOptions, MultiRspackOptions } from './MultiCompiler';
8
7
  export { MultiCompiler } from './MultiCompiler';
8
+ export { rspackVersion, version };
9
9
  import { RspackOptionsApply } from './rspackOptionsApply';
10
- export { RspackOptionsApply, RspackOptionsApply as WebpackOptionsApply };
11
10
  export type { ChunkGroup } from './binding';
12
11
  export { AsyncDependenciesBlock, Dependency, EntryDependency, } from './binding';
13
12
  export type { Chunk } from './Chunk';
@@ -17,6 +16,7 @@ export { ExternalModule } from './ExternalModule';
17
16
  export type { ResolveData, ResourceDataWithData } from './Module';
18
17
  export { Module } from './Module';
19
18
  export type { default as ModuleGraph } from './ModuleGraph';
19
+ export { ModuleGraphConnection, type ConnectionState, } from './ModuleGraphConnection';
20
20
  export { MultiStats } from './MultiStats';
21
21
  export { NormalModule } from './NormalModule';
22
22
  export type { NormalModuleFactory } from './NormalModuleFactory';
@@ -26,9 +26,10 @@ export { RuntimeModule } from './RuntimeModule';
26
26
  export type { StatsAsset, StatsChunk, StatsCompilation, StatsError, StatsModule, } from './Stats';
27
27
  export { Stats } from './Stats';
28
28
  export { StatsErrorCode } from './stats/statsFactoryUtils';
29
+ export { RspackOptionsApply, RspackOptionsApply as WebpackOptionsApply };
29
30
  import * as ModuleFilenameHelpers from './lib/ModuleFilenameHelpers';
30
- export { ModuleFilenameHelpers };
31
31
  export { Template } from './Template';
32
+ export { ModuleFilenameHelpers };
32
33
  export declare const WebpackError: ErrorConstructor;
33
34
  export type { Watching } from './Watching';
34
35
  import * as sources from 'webpack-sources';
@@ -43,10 +44,10 @@ type Config = {
43
44
  export declare const config: Config;
44
45
  export type * from './config';
45
46
  export declare const util: {
46
- createHash: (algorithm: "debug" | "xxhash64" | "md4" | "native-md4" | (string & {}) | (new () => import("./util/hash").default)) => import("./util/hash").default;
47
+ createHash: (algorithm: "xxhash64" | "md4" | "native-md4" | (string & {}) | (new () => import("./util/hash").default)) => import("./util/hash").default;
47
48
  cleverMerge: <First, Second>(first: First, second: Second) => First | Second | (First & Second);
48
49
  };
49
- export type { BannerPluginArgument, DefinePluginOptions, EntryOptions, ProgressPluginArgument, ProvidePluginOptions, } from './builtin-plugin';
50
+ export type { BannerPluginArgument, DefinePluginOptions, EntryOptions, ProgressPluginHandlerInfo, ProgressPluginOptions, ProvidePluginOptions, } from './builtin-plugin';
50
51
  export { BannerPlugin, CaseSensitivePlugin, DefinePlugin, DynamicEntryPlugin, EntryPlugin, ExternalsPlugin, HotModuleReplacementPlugin, IgnorePlugin, type IgnorePluginOptions, NoEmitOnErrorsPlugin, ProgressPlugin, ProvidePlugin, RuntimePlugin, } from './builtin-plugin';
51
52
  export { DllPlugin, type DllPluginOptions } from './lib/DllPlugin';
52
53
  export { DllReferencePlugin, type DllReferencePluginOptions, type DllReferencePluginOptionsContent, type DllReferencePluginOptionsManifest, type DllReferencePluginOptionsSourceType, } from './lib/DllReferencePlugin';
@@ -55,7 +56,7 @@ export { EnvironmentPlugin } from './lib/EnvironmentPlugin';
55
56
  export { LoaderOptionsPlugin } from './lib/LoaderOptionsPlugin';
56
57
  export { LoaderTargetPlugin } from './lib/LoaderTargetPlugin';
57
58
  export type { OutputFileSystem, WatchFileSystem } from './util/fs';
58
- import { EsmLibraryPlugin, FetchCompileAsyncWasmPlugin, lazyCompilationMiddleware, SubresourceIntegrityPlugin } from './builtin-plugin';
59
+ import { FetchCompileAsyncWasmPlugin, lazyCompilationMiddleware, rsc, SubresourceIntegrityPlugin } from './builtin-plugin';
59
60
  export { SubresourceIntegrityPlugin };
60
61
  interface Web {
61
62
  FetchCompileAsyncWasmPlugin: typeof FetchCompileAsyncWasmPlugin;
@@ -76,6 +77,11 @@ interface Electron {
76
77
  ElectronTargetPlugin: typeof ElectronTargetPlugin;
77
78
  }
78
79
  export declare const electron: Electron;
80
+ import { HashedModuleIdsPlugin } from './builtin-plugin';
81
+ interface Ids {
82
+ HashedModuleIdsPlugin: typeof HashedModuleIdsPlugin;
83
+ }
84
+ export declare const ids: Ids;
79
85
  import { EnableLibraryPlugin } from './builtin-plugin';
80
86
  interface Library {
81
87
  EnableLibraryPlugin: typeof EnableLibraryPlugin;
@@ -121,11 +127,14 @@ export declare const container: {
121
127
  import { ConsumeSharedPlugin } from './sharing/ConsumeSharedPlugin';
122
128
  import { ProvideSharedPlugin } from './sharing/ProvideSharedPlugin';
123
129
  import { SharePlugin } from './sharing/SharePlugin';
130
+ import { TreeShakingSharedPlugin } from './sharing/TreeShakingSharedPlugin';
124
131
  export type { ConsumeSharedPluginOptions, Consumes, ConsumesConfig, ConsumesItem, ConsumesObject, } from './sharing/ConsumeSharedPlugin';
125
132
  export type { ProvideSharedPluginOptions, Provides, ProvidesConfig, ProvidesItem, ProvidesObject, } from './sharing/ProvideSharedPlugin';
126
133
  export type { Shared, SharedConfig, SharedItem, SharedObject, SharePluginOptions, } from './sharing/SharePlugin';
134
+ export type { TreeshakingSharedPluginOptions } from './sharing/TreeShakingSharedPlugin';
127
135
  export declare const sharing: {
128
136
  ProvideSharedPlugin: typeof ProvideSharedPlugin;
137
+ TreeShakingSharedPlugin: typeof TreeShakingSharedPlugin;
129
138
  ConsumeSharedPlugin: typeof ConsumeSharedPlugin;
130
139
  SharePlugin: typeof SharePlugin;
131
140
  };
@@ -143,7 +152,6 @@ interface Experiments {
143
152
  cleanup: () => Promise<void>;
144
153
  };
145
154
  RemoveDuplicateModulesPlugin: typeof RemoveDuplicateModulesPlugin;
146
- EsmLibraryPlugin: typeof EsmLibraryPlugin;
147
155
  RsdoctorPlugin: typeof RsdoctorPlugin;
148
156
  RstestPlugin: typeof RstestPlugin;
149
157
  RslibPlugin: typeof RslibPlugin;
@@ -162,5 +170,6 @@ interface Experiments {
162
170
  CssChunkingPlugin: typeof CssChunkingPlugin;
163
171
  createNativePlugin: typeof createNativePlugin;
164
172
  VirtualModulesPlugin: typeof VirtualModulesPlugin;
173
+ rsc: typeof rsc;
165
174
  }
166
175
  export declare const experiments: Experiments;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import './checkNodeVersion';
1
2
  import * as rspackExports from './exports';
2
3
  import { rspack as rspackFn } from './rspack';
3
4
  type Rspack = typeof rspackFn & typeof rspackExports & {
@@ -7,4 +8,4 @@ type Rspack = typeof rspackFn & typeof rspackExports & {
7
8
  declare const rspack: Rspack;
8
9
  export * from './exports';
9
10
  export default rspack;
10
- export { rspack };
11
+ export { rspack, rspack as 'module.exports' };