@rspack/browser 1.7.3 → 2.0.0-alpha.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.
Files changed (108) hide show
  1. package/dist/BuildInfo.d.ts +3 -3
  2. package/dist/Chunk.d.ts +3 -3
  3. package/dist/ChunkGraph.d.ts +2 -2
  4. package/dist/Chunks.d.ts +2 -2
  5. package/dist/Compilation.d.ts +3 -3
  6. package/dist/Compiler.d.ts +4 -2
  7. package/dist/ConcatenatedModule.d.ts +1 -1
  8. package/dist/ContextModule.d.ts +1 -1
  9. package/dist/Diagnostics.d.ts +1 -1
  10. package/dist/Entrypoint.d.ts +1 -1
  11. package/dist/ExportsInfo.d.ts +1 -1
  12. package/dist/ExternalModule.d.ts +1 -1
  13. package/dist/FileSystem.d.ts +1 -1
  14. package/dist/Module.d.ts +3 -3
  15. package/dist/ModuleGraph.d.ts +1 -1
  16. package/dist/MultiCompiler.d.ts +1 -1
  17. package/dist/NativeWatchFileSystem.d.ts +1 -1
  18. package/dist/NormalModule.d.ts +2 -2
  19. package/dist/NormalModuleFactory.d.ts +1 -1
  20. package/dist/Resolver.d.ts +1 -1
  21. package/dist/ResolverFactory.d.ts +1 -1
  22. package/dist/RspackError.d.ts +2 -2
  23. package/dist/RuntimeGlobals.d.ts +2 -2
  24. package/dist/RuntimeModule.d.ts +1 -1
  25. package/dist/builtin-loader/lightningcss/index.d.ts +11 -14
  26. package/dist/builtin-loader/lightningcss/target.d.ts +4 -0
  27. package/dist/builtin-loader/swc/index.d.ts +2 -2
  28. package/dist/builtin-loader/swc/types.d.ts +0 -6
  29. package/dist/builtin-plugin/BannerPlugin.d.ts +1 -1
  30. package/dist/builtin-plugin/CircularDependencyRspackPlugin.d.ts +1 -1
  31. package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
  32. package/dist/builtin-plugin/CssChunkingPlugin.d.ts +1 -1
  33. package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -1
  34. package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -1
  35. package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +1 -1
  36. package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +1 -1
  37. package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
  38. package/dist/builtin-plugin/EnableLibraryPlugin.d.ts +1 -1
  39. package/dist/builtin-plugin/EntryPlugin.d.ts +1 -1
  40. package/dist/builtin-plugin/EsmLibraryPlugin.d.ts +2 -0
  41. package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
  42. package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
  43. package/dist/builtin-plugin/ExternalsPlugin.d.ts +1 -1
  44. package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +1 -1
  45. package/dist/builtin-plugin/HotModuleReplacementPlugin.d.ts +1 -1
  46. package/dist/builtin-plugin/HttpUriPlugin.d.ts +1 -1
  47. package/dist/builtin-plugin/IgnorePlugin.d.ts +1 -1
  48. package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +1 -1
  49. package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
  50. package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +5 -9
  51. package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -1
  52. package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -1
  53. package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +1 -1
  54. package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +1 -1
  55. package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +1 -1
  56. package/dist/builtin-plugin/ProgressPlugin.d.ts +1 -1
  57. package/dist/builtin-plugin/RsdoctorPlugin.d.ts +2 -6
  58. package/dist/builtin-plugin/RslibPlugin.d.ts +1 -1
  59. package/dist/builtin-plugin/RstestPlugin.d.ts +1 -1
  60. package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +1 -1
  61. package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -5
  62. package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
  63. package/dist/builtin-plugin/SplitChunksPlugin.d.ts +1 -1
  64. package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +2 -2
  65. package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +3 -2
  66. package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +1 -1
  67. package/dist/builtin-plugin/WorkerPlugin.d.ts +1 -1
  68. package/dist/builtin-plugin/base.d.ts +1 -1
  69. package/dist/builtin-plugin/css-extract/index.d.ts +1 -1
  70. package/dist/builtin-plugin/html-plugin/hooks.d.ts +1 -1
  71. package/dist/builtin-plugin/html-plugin/options.d.ts +0 -5
  72. package/dist/builtin-plugin/html-plugin/plugin.d.ts +2 -6
  73. package/dist/config/adapter.d.ts +1 -1
  74. package/dist/config/adapterRuleUse.d.ts +3 -2
  75. package/dist/config/defaults.d.ts +4 -2
  76. package/dist/config/normalization.d.ts +5 -33
  77. package/dist/config/target.d.ts +14 -11
  78. package/dist/config/types.d.ts +75 -152
  79. package/dist/container/ContainerPlugin.d.ts +1 -1
  80. package/dist/container/ContainerReferencePlugin.d.ts +1 -1
  81. package/dist/container/ModuleFederationManifestPlugin.d.ts +1 -1
  82. package/dist/container/ModuleFederationPlugin.d.ts +2 -0
  83. package/dist/container/ModuleFederationRuntimePlugin.d.ts +4 -0
  84. package/dist/exports.d.ts +6 -19
  85. package/dist/{index.mjs → index.js} +2549 -3874
  86. package/dist/lib/DllPlugin.d.ts +1 -1
  87. package/dist/lib/DllReferencePlugin.d.ts +3 -3
  88. package/dist/lib/WebpackError.d.ts +1 -1
  89. package/dist/loader-runner/index.d.ts +1 -1
  90. package/dist/loader-runner/worker.d.ts +1 -1
  91. package/dist/napi-binding.d.ts +46 -55
  92. package/dist/rspack.wasm32-wasi.wasm +0 -0
  93. package/dist/runtime/moduleFederationDefaultRuntime.d.ts +1 -2
  94. package/dist/sharing/ConsumeSharedPlugin.d.ts +1 -1
  95. package/dist/sharing/ProvideSharedPlugin.d.ts +1 -1
  96. package/dist/sharing/ShareRuntimePlugin.d.ts +1 -1
  97. package/dist/stats/StatsFactory.d.ts +1 -1
  98. package/dist/stats/statsFactoryUtils.d.ts +2 -5
  99. package/dist/swc.d.ts +1 -1
  100. package/dist/taps/compilation.d.ts +1 -1
  101. package/dist/taps/types.d.ts +1 -1
  102. package/dist/util/SplitChunkSize.d.ts +1 -1
  103. package/dist/util/source.d.ts +1 -1
  104. package/dist/util/targetsVersion.d.ts +2 -0
  105. package/package.json +2 -3
  106. package/dist/builtin-loader/index.d.ts +0 -1
  107. /package/dist/{index.mjs.LICENSE.txt → index.js.LICENSE.txt} +0 -0
  108. /package/dist/{rslib-runtime.mjs → rslib-runtime.js} +0 -0
@@ -1,7 +1,7 @@
1
- import binding from '@rspack/binding';
1
+ import binding from './binding';
2
2
  import type { Source } from 'webpack-sources';
3
3
  declare const $assets: unique symbol;
4
- declare module '@rspack/binding' {
4
+ declare module './binding' {
5
5
  interface Assets {
6
6
  [$assets]: Record<string, Source>;
7
7
  }
@@ -13,5 +13,5 @@ declare module '@rspack/binding' {
13
13
  buildDependencies: Set<string>;
14
14
  }
15
15
  }
16
- export type { BuildInfo } from '@rspack/binding';
16
+ export type { BuildInfo } from './binding';
17
17
  export declare const commitCustomFieldsToRust: (buildInfo: binding.BuildInfo) => void;
package/dist/Chunk.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { type ChunkGroup } from '@rspack/binding';
1
+ import { type ChunkGroup } from './binding';
2
2
  interface ChunkMaps {
3
3
  hash: Record<string | number, string>;
4
4
  contentHash: Record<string | number, Record<string, string>>;
5
5
  name: Record<string | number, string>;
6
6
  }
7
- declare module '@rspack/binding' {
7
+ declare module './binding' {
8
8
  interface Chunk {
9
9
  readonly files: ReadonlySet<string>;
10
10
  readonly runtime: ReadonlySet<string>;
@@ -13,4 +13,4 @@ declare module '@rspack/binding' {
13
13
  getChunkMaps(realHash: boolean): ChunkMaps;
14
14
  }
15
15
  }
16
- export { Chunk } from '@rspack/binding';
16
+ export { Chunk } from './binding';
@@ -1,9 +1,9 @@
1
1
  import type { RuntimeSpec } from './util/runtime';
2
- declare module '@rspack/binding' {
2
+ declare module './binding' {
3
3
  interface ChunkGraph {
4
4
  getModuleChunksIterable(module: Module): Iterable<Chunk>;
5
5
  getOrderedChunkModulesIterable(chunk: Chunk, compareFn: (a: Module, b: Module) => number): Iterable<Module>;
6
6
  getModuleHash(module: Module, runtime: RuntimeSpec): string | null;
7
7
  }
8
8
  }
9
- export { ChunkGraph } from '@rspack/binding';
9
+ export { ChunkGraph } from './binding';
package/dist/Chunks.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Chunks } from '@rspack/binding';
2
- declare module '@rspack/binding' {
1
+ import { Chunks } from './binding';
2
+ declare module './binding' {
3
3
  interface Chunks {
4
4
  [Symbol.iterator](): SetIterator<Chunk>;
5
5
  entries(): SetIterator<[Chunk, Chunk]>;
@@ -7,9 +7,9 @@
7
7
  * Copyright (c) JS Foundation and other contributors
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
- import type { AssetInfo, ChunkGroup, Dependency, ExternalObject, JsCompilation } from '@rspack/binding';
11
- import binding from '@rspack/binding';
12
- export type { AssetInfo } from '@rspack/binding';
10
+ import type { AssetInfo, ChunkGroup, Dependency, ExternalObject, JsCompilation } from './binding';
11
+ import binding from './binding';
12
+ export type { AssetInfo } from './binding';
13
13
  import * as liteTapable from '@rspack/lite-tapable';
14
14
  import type { Source } from 'webpack-sources';
15
15
  import type { EntryOptions, EntryPlugin } from './builtin-plugin';
@@ -7,7 +7,7 @@
7
7
  * Copyright (c) JS Foundation and other contributors
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
- import type binding from '@rspack/binding';
10
+ import type binding from './binding';
11
11
  import * as liteTapable from '@rspack/lite-tapable';
12
12
  import type Watchpack from 'watchpack';
13
13
  import type { Source } from 'webpack-sources';
@@ -16,7 +16,7 @@ import type { CompilationParams } from './Compilation';
16
16
  import { Compilation } from './Compilation';
17
17
  import { ContextModuleFactory } from './ContextModuleFactory';
18
18
  import type { EntryNormalized, OutputNormalized, RspackOptionsNormalized, RspackPluginInstance } from './config';
19
- import type { PlatformTargetProperties } from './config/target';
19
+ import type { ExtractedTargetProperties, PlatformTargetProperties } from './config/target';
20
20
  import type { FileSystemInfoEntry } from './FileSystemInfo';
21
21
  import type { rspack } from './index';
22
22
  import Cache from './lib/Cache';
@@ -129,6 +129,8 @@ declare class Compiler {
129
129
  get _lastCompilation(): Compilation | undefined;
130
130
  get platform(): PlatformTargetProperties;
131
131
  set platform(platform: PlatformTargetProperties);
132
+ get target(): ExtractedTargetProperties;
133
+ set target(target: ExtractedTargetProperties);
132
134
  /**
133
135
  * Note: This is not a webpack public API, maybe removed in future.
134
136
  * @internal
@@ -1 +1 @@
1
- export { ConcatenatedModule } from '@rspack/binding';
1
+ export { ConcatenatedModule } from './binding';
@@ -1 +1 @@
1
- export { ContextModule } from '@rspack/binding';
1
+ export { ContextModule } from './binding';
@@ -1,4 +1,4 @@
1
- import type { Diagnostics } from '@rspack/binding';
1
+ import type { Diagnostics } from './binding';
2
2
  import type { RspackError } from './RspackError';
3
3
  declare const $proxy: unique symbol;
4
4
  export declare function createDiagnosticArray(adm: Diagnostics & {
@@ -1,2 +1,2 @@
1
- import type { ChunkGroup } from '@rspack/binding';
1
+ import type { ChunkGroup } from './binding';
2
2
  export type Entrypoint = ChunkGroup;
@@ -1,4 +1,4 @@
1
- import type { JsExportsInfo } from '@rspack/binding';
1
+ import type { JsExportsInfo } from './binding';
2
2
  import type { RuntimeSpec } from './util/runtime';
3
3
  /**
4
4
  * Unused: 0
@@ -1 +1 @@
1
- export { ExternalModule } from '@rspack/binding';
1
+ export { ExternalModule } from './binding';
@@ -1,4 +1,4 @@
1
- import type { NodeFsStats, ThreadsafeNodeFS } from '@rspack/binding';
1
+ import type { NodeFsStats, ThreadsafeNodeFS } from './binding';
2
2
  import { type InputFileSystem, type IntermediateFileSystem, type OutputFileSystem } from './util/fs';
3
3
  declare class ThreadsafeInputNodeFS implements ThreadsafeNodeFS {
4
4
  writeFile: (name: string, content: Buffer) => Promise<void>;
package/dist/Module.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import binding, { type AssetInfo } from '@rspack/binding';
1
+ import binding, { type AssetInfo } from './binding';
2
2
  import type { Source } from 'webpack-sources';
3
3
  import type { ResourceData } from './Resolver';
4
4
  import './BuildInfo';
@@ -32,11 +32,11 @@ export declare class ContextModuleFactoryAfterResolveData {
32
32
  private constructor();
33
33
  }
34
34
  export type ContextModuleFactoryAfterResolveResult = false | ContextModuleFactoryAfterResolveData;
35
- declare module '@rspack/binding' {
35
+ declare module './binding' {
36
36
  interface Module {
37
37
  identifier(): string;
38
38
  originalSource(): Source | null;
39
39
  emitFile(filename: string, source: Source, assetInfo?: AssetInfo): void;
40
40
  }
41
41
  }
42
- export { Module } from '@rspack/binding';
42
+ export { Module } from './binding';
@@ -1,4 +1,4 @@
1
- import type { Dependency, JsModuleGraph, ModuleGraphConnection } from '@rspack/binding';
1
+ import type { Dependency, JsModuleGraph, ModuleGraphConnection } from './binding';
2
2
  import { ExportsInfo } from './ExportsInfo';
3
3
  import type { Module } from './Module';
4
4
  export default class ModuleGraph {
@@ -42,7 +42,7 @@ export declare class MultiCompiler {
42
42
  watching?: MultiWatching;
43
43
  constructor(compilers: Compiler[] | Record<string, Compiler>, options?: MultiCompilerOptions);
44
44
  set unsafeFastDrop(value: boolean);
45
- get options(): import(".").RspackOptionsNormalized[] & MultiCompilerOptions;
45
+ get options(): import("./config").RspackOptionsNormalized[] & MultiCompilerOptions;
46
46
  get outputPath(): string;
47
47
  get inputFileSystem(): InputFileSystem;
48
48
  get outputFileSystem(): typeof import("fs");
@@ -1,4 +1,4 @@
1
- import binding from '@rspack/binding';
1
+ import binding from './binding';
2
2
  import type Watchpack from 'watchpack';
3
3
  import type { FileSystemInfoEntry, InputFileSystem, Watcher, WatchFileSystem } from './util/fs';
4
4
  export default class NativeWatchFileSystem implements WatchFileSystem {
@@ -7,9 +7,9 @@ export interface NormalModuleCompilationHooks {
7
7
  readResourceForScheme: any;
8
8
  readResource: liteTapable.HookMap<liteTapable.AsyncSeriesBailHook<[LoaderContext], string | Buffer>>;
9
9
  }
10
- declare module '@rspack/binding' {
10
+ declare module './binding' {
11
11
  interface NormalModuleConstructor {
12
12
  getCompilationHooks(compilation: Compilation): NormalModuleCompilationHooks;
13
13
  }
14
14
  }
15
- export { NormalModule } from '@rspack/binding';
15
+ export { NormalModule } from './binding';
@@ -1,4 +1,4 @@
1
- import type binding from '@rspack/binding';
1
+ import type binding from './binding';
2
2
  import * as liteTapable from '@rspack/lite-tapable';
3
3
  import type { ResolveData, ResourceDataWithData } from './Module';
4
4
  import type { ResolveOptionsWithDependencyType, ResolverFactory } from './ResolverFactory';
@@ -1,4 +1,4 @@
1
- import type binding from '@rspack/binding';
1
+ import type binding from './binding';
2
2
  import type { ResolveCallback } from './config/adapterRuleUse';
3
3
  export type ResolveContext = {
4
4
  contextDependencies?: {
@@ -1,4 +1,4 @@
1
- import binding from '@rspack/binding';
1
+ import binding from './binding';
2
2
  import { type Resolve } from './config';
3
3
  import { Resolver } from './Resolver';
4
4
  export type ResolveOptionsWithDependencyType = Resolve & {
@@ -1,5 +1,5 @@
1
- import type binding from '@rspack/binding';
2
- export type { RspackError } from '@rspack/binding';
1
+ import type binding from './binding';
2
+ export type { RspackError } from './binding';
3
3
  export type RspackSeverity = binding.JsRspackSeverity;
4
4
  export declare class NonErrorEmittedError extends Error {
5
5
  constructor(error: Error);
@@ -7,7 +7,7 @@
7
7
  * Copyright (c) JS Foundation and other contributors
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
- import type { JsRuntimeGlobals } from '@rspack/binding';
10
+ import type { JsRuntimeGlobals } from './binding';
11
11
  import type { RspackOptionsNormalized } from './config';
12
12
  export declare function __from_binding_runtime_globals(runtimeRequirements: JsRuntimeGlobals, compilerRuntimeGlobals: Record<string, string>): Set<string>;
13
13
  export declare function __to_binding_runtime_globals(runtimeRequirements: Set<string>, compilerRuntimeGlobals: Record<string, string>): JsRuntimeGlobals;
@@ -352,5 +352,5 @@ export declare enum RuntimeVariable {
352
352
  }
353
353
  export declare function renderRuntimeVariables(variable: RuntimeVariable, _compilerOptions?: RspackOptionsNormalized): string;
354
354
  export declare function createCompilerRuntimeGlobals(compilerOptions?: RspackOptionsNormalized): Record<keyof typeof RuntimeGlobals, string>;
355
- declare const DefaultRuntimeGlobals: Record<"publicPath" | "chunkName" | "moduleId" | "module" | "exports" | "require" | "global" | "system" | "requireScope" | "thisAsExports" | "returnExportsFromRuntime" | "moduleLoaded" | "entryModuleId" | "moduleCache" | "moduleFactories" | "moduleFactoriesAddOnly" | "ensureChunk" | "ensureChunkHandlers" | "ensureChunkIncludeEntries" | "prefetchChunk" | "prefetchChunkHandlers" | "preloadChunk" | "preloadChunkHandlers" | "definePropertyGetters" | "makeNamespaceObject" | "createFakeNamespaceObject" | "compatGetDefaultExport" | "harmonyModuleDecorator" | "nodeModuleDecorator" | "getFullHash" | "wasmInstances" | "instantiateWasm" | "uncaughtErrorHandler" | "scriptNonce" | "loadScript" | "createScript" | "createScriptUrl" | "getTrustedTypesPolicy" | "hasFetchPriority" | "runtimeId" | "getChunkScriptFilename" | "getChunkCssFilename" | "rspackVersion" | "hasCssModules" | "rspackUniqueId" | "getChunkUpdateScriptFilename" | "getChunkUpdateCssFilename" | "startup" | "startupNoDefault" | "startupOnlyAfter" | "startupOnlyBefore" | "chunkCallback" | "startupEntrypoint" | "startupChunkDependencies" | "onChunksLoaded" | "externalInstallChunk" | "interceptModuleExecution" | "shareScopeMap" | "initializeSharing" | "currentRemoteGetScope" | "getUpdateManifestFilename" | "hmrDownloadManifest" | "hmrDownloadUpdateHandlers" | "hmrModuleData" | "hmrInvalidateModuleHandlers" | "hmrRuntimeStatePrefix" | "amdDefine" | "amdOptions" | "hasOwnProperty" | "systemContext" | "baseURI" | "relativeUrl" | "asyncModule" | "asyncModuleExportSymbol" | "makeDeferredNamespaceObject" | "makeDeferredNamespaceObjectSymbol", string>;
355
+ declare const DefaultRuntimeGlobals: Record<"publicPath" | "chunkName" | "moduleId" | "module" | "require" | "global" | "system" | "exports" | "requireScope" | "thisAsExports" | "returnExportsFromRuntime" | "moduleLoaded" | "entryModuleId" | "moduleCache" | "moduleFactories" | "moduleFactoriesAddOnly" | "ensureChunk" | "ensureChunkHandlers" | "ensureChunkIncludeEntries" | "prefetchChunk" | "prefetchChunkHandlers" | "preloadChunk" | "preloadChunkHandlers" | "definePropertyGetters" | "makeNamespaceObject" | "createFakeNamespaceObject" | "compatGetDefaultExport" | "harmonyModuleDecorator" | "nodeModuleDecorator" | "getFullHash" | "wasmInstances" | "instantiateWasm" | "uncaughtErrorHandler" | "scriptNonce" | "loadScript" | "createScript" | "createScriptUrl" | "getTrustedTypesPolicy" | "hasFetchPriority" | "runtimeId" | "getChunkScriptFilename" | "getChunkCssFilename" | "rspackVersion" | "hasCssModules" | "rspackUniqueId" | "getChunkUpdateScriptFilename" | "getChunkUpdateCssFilename" | "startup" | "startupNoDefault" | "startupOnlyAfter" | "startupOnlyBefore" | "chunkCallback" | "startupEntrypoint" | "startupChunkDependencies" | "onChunksLoaded" | "externalInstallChunk" | "interceptModuleExecution" | "shareScopeMap" | "initializeSharing" | "currentRemoteGetScope" | "getUpdateManifestFilename" | "hmrDownloadManifest" | "hmrDownloadUpdateHandlers" | "hmrModuleData" | "hmrInvalidateModuleHandlers" | "hmrRuntimeStatePrefix" | "amdDefine" | "amdOptions" | "hasOwnProperty" | "systemContext" | "baseURI" | "relativeUrl" | "asyncModule" | "asyncModuleExportSymbol" | "makeDeferredNamespaceObject" | "makeDeferredNamespaceObjectSymbol", string>;
356
356
  export { DefaultRuntimeGlobals as RuntimeGlobals };
@@ -1,4 +1,4 @@
1
- import type { JsAddingRuntimeModule, JsRuntimeModule, JsSource } from '@rspack/binding';
1
+ import type { JsAddingRuntimeModule, JsRuntimeModule, JsSource } from './binding';
2
2
  import type { Chunk } from './Chunk';
3
3
  import type { ChunkGraph } from './ChunkGraph';
4
4
  import type { Compilation } from './Compilation';
@@ -1,3 +1,4 @@
1
+ import type { GetLoaderOptions } from '../../config/adapterRuleUse';
1
2
  /**
2
3
  MIT License
3
4
 
@@ -49,15 +50,15 @@ export declare enum Features {
49
50
  Color = 64512
50
51
  }
51
52
  export interface Targets {
52
- android?: number;
53
- chrome?: number;
54
- edge?: number;
55
- firefox?: number;
56
- ie?: number;
57
- ios_saf?: number;
58
- opera?: number;
59
- safari?: number;
60
- samsung?: number;
53
+ android?: string;
54
+ chrome?: string;
55
+ edge?: string;
56
+ firefox?: string;
57
+ ie?: string;
58
+ ios_saf?: string;
59
+ opera?: string;
60
+ safari?: string;
61
+ samsung?: string;
61
62
  }
62
63
  export interface Drafts {
63
64
  /** Whether to enable @custom-media rules. */
@@ -105,13 +106,9 @@ export type LoaderOptions = {
105
106
  targets?: Targets | string[] | string;
106
107
  include?: FeatureOptions;
107
108
  exclude?: FeatureOptions;
108
- /**
109
- * @deprecated Use `drafts` instead.
110
- * This will be removed in the next major version.
111
- */
112
- draft?: Drafts;
113
109
  drafts?: Drafts;
114
110
  nonStandard?: NonStandard;
115
111
  pseudoClasses?: PseudoClasses;
116
112
  unusedSymbols?: string[];
117
113
  };
114
+ export declare const getLightningcssLoaderOptions: GetLoaderOptions;
@@ -0,0 +1,4 @@
1
+ import type binding from '../../binding';
2
+ import type { Targets } from './index';
3
+ export declare function encodeTargets(targets: Targets): binding.RawLightningCssBrowsers;
4
+ export declare function defaultTargetsFromRspackTargets(targets: Record<string, string>): binding.RawLightningCssBrowsers;
@@ -1,5 +1,5 @@
1
+ import type { GetLoaderOptions } from '../../config/adapterRuleUse';
1
2
  export type { CollectTypeScriptInfoOptions } from './collectTypeScriptInfo';
2
- export { resolveCollectTypeScriptInfo } from './collectTypeScriptInfo';
3
3
  export type { PluginImportOptions } from './pluginImport';
4
- export { resolvePluginImport } from './pluginImport';
5
4
  export type { SwcLoaderEnvConfig, SwcLoaderEsParserConfig, SwcLoaderJscConfig, SwcLoaderModuleConfig, SwcLoaderOptions, SwcLoaderParserConfig, SwcLoaderTransformConfig, SwcLoaderTsParserConfig, } from './types';
5
+ export declare const getSwcLoaderOptions: GetLoaderOptions;
@@ -21,12 +21,6 @@ export type SwcLoaderOptions = Config & {
21
21
  */
22
22
  rspackExperiments?: {
23
23
  import?: PluginImportOptions;
24
- /**
25
- * @deprecated Use top-level `collectTypeScriptInfo` instead.
26
- * Collects information from TypeScript's AST for consumption by subsequent Rspack processes,
27
- * providing better TypeScript development experience and smaller output bundle size.
28
- */
29
- collectTypeScriptInfo?: CollectTypeScriptInfoOptions;
30
24
  };
31
25
  };
32
26
  export interface TerserCompressOptions {
@@ -1,4 +1,4 @@
1
- import { type Chunk } from '@rspack/binding';
1
+ import { type Chunk } from '../binding';
2
2
  export type Rule = string | RegExp;
3
3
  export type Rules = Rule[] | Rule;
4
4
  export type BannerFunction = (args: {
@@ -1,4 +1,4 @@
1
- import { type BuiltinPlugin, BuiltinPluginName } from '@rspack/binding';
1
+ import { type BuiltinPlugin, BuiltinPluginName } from '../binding';
2
2
  import type { Compilation } from '../Compilation';
3
3
  import type { Compiler } from '../Compiler';
4
4
  import type { Module } from '../Module';
@@ -1,4 +1,4 @@
1
- import { type RawCopyPattern } from '@rspack/binding';
1
+ import { type RawCopyPattern } from '../binding';
2
2
  export type CopyRspackPluginOptions = {
3
3
  /** An array of objects that describe the copy operations to be performed. */
4
4
  patterns: (string | (Pick<RawCopyPattern, 'from'> & Partial<Omit<RawCopyPattern, 'from'>>))[];
@@ -1,4 +1,4 @@
1
- import binding from '@rspack/binding';
1
+ import binding from '../binding';
2
2
  export interface CssChunkingPluginOptions {
3
3
  strict?: boolean;
4
4
  minSize?: number;
@@ -1,4 +1,4 @@
1
- import { type BuiltinPlugin, BuiltinPluginName } from '@rspack/binding';
1
+ import { type BuiltinPlugin, BuiltinPluginName } from '../binding';
2
2
  import { RspackBuiltinPlugin } from './base';
3
3
  export declare class DeterministicChunkIdsPlugin extends RspackBuiltinPlugin {
4
4
  name: BuiltinPluginName;
@@ -1,4 +1,4 @@
1
- import { type BuiltinPlugin, BuiltinPluginName } from '@rspack/binding';
1
+ import { type BuiltinPlugin, BuiltinPluginName } from '../binding';
2
2
  import { RspackBuiltinPlugin } from './base';
3
3
  export declare class DeterministicModuleIdsPlugin extends RspackBuiltinPlugin {
4
4
  name: BuiltinPluginName;
@@ -1,4 +1,4 @@
1
- import { type RawDllReferenceAgencyPluginOptions } from '@rspack/binding';
1
+ import { type RawDllReferenceAgencyPluginOptions } from '../binding';
2
2
  export type DllReferenceAgencyPluginOptions = RawDllReferenceAgencyPluginOptions;
3
3
  export declare const DllReferenceAgencyPlugin: {
4
4
  new (options: RawDllReferenceAgencyPluginOptions): {
@@ -1,4 +1,4 @@
1
- import { type BuiltinPlugin, BuiltinPluginName } from '@rspack/binding';
1
+ import { type BuiltinPlugin, BuiltinPluginName } from '../binding';
2
2
  import type { Compiler } from '../Compiler';
3
3
  import type { EntryDynamicNormalized } from '../config';
4
4
  import { RspackBuiltinPlugin } from './base';
@@ -12,7 +12,7 @@ declare const EnableChunkLoadingPluginInner: {
12
12
  new (type: string): {
13
13
  name: string;
14
14
  _args: [type: string];
15
- affectedHooks: keyof import("../Compiler").CompilerHooks | undefined;
15
+ affectedHooks: keyof import("..").CompilerHooks | undefined;
16
16
  raw(compiler: Compiler): import("../binding").BuiltinPlugin;
17
17
  apply(compiler: Compiler): void;
18
18
  };
@@ -1,4 +1,4 @@
1
- import { type BuiltinPlugin, BuiltinPluginName } from '@rspack/binding';
1
+ import { type BuiltinPlugin, BuiltinPluginName } from '../binding';
2
2
  import type { Compiler, LibraryType } from '..';
3
3
  import { RspackBuiltinPlugin } from './base';
4
4
  export declare class EnableLibraryPlugin extends RspackBuiltinPlugin {
@@ -1,4 +1,4 @@
1
- import { EntryDependency, type JsEntryOptions } from '@rspack/binding';
1
+ import { EntryDependency, type JsEntryOptions } from '../binding';
2
2
  import type { EntryDescriptionNormalized } from '../config';
3
3
  /**
4
4
  * Options for the `EntryPlugin`.
@@ -1,4 +1,6 @@
1
1
  import type { Compiler } from '../Compiler';
2
+ import type { RspackOptionsNormalized } from '../config';
3
+ export declare function applyLimits(options: RspackOptionsNormalized): void;
2
4
  export declare class EsmLibraryPlugin {
3
5
  static PLUGIN_NAME: string;
4
6
  options?: {
@@ -1,4 +1,4 @@
1
- import { type RawEvalDevToolModulePluginOptions } from '@rspack/binding';
1
+ import { type RawEvalDevToolModulePluginOptions } from '../binding';
2
2
  export type { RawEvalDevToolModulePluginOptions as EvalDevToolModulePluginOptions };
3
3
  export declare const EvalDevToolModulePlugin: {
4
4
  new (options: RawEvalDevToolModulePluginOptions): {
@@ -1,4 +1,4 @@
1
- import { type SourceMapDevToolPluginOptions } from '@rspack/binding';
1
+ import { type SourceMapDevToolPluginOptions } from '../binding';
2
2
  export declare const EvalSourceMapDevToolPlugin: {
3
3
  new (options: SourceMapDevToolPluginOptions): {
4
4
  name: string;
@@ -1,4 +1,4 @@
1
- import { type BuiltinPlugin, BuiltinPluginName } from '@rspack/binding';
1
+ import { type BuiltinPlugin, BuiltinPluginName } from '../binding';
2
2
  import type { Externals } from '..';
3
3
  import { RspackBuiltinPlugin } from './base';
4
4
  export declare class ExternalsPlugin extends RspackBuiltinPlugin {
@@ -1,4 +1,4 @@
1
- import { type BuiltinPlugin, BuiltinPluginName } from '@rspack/binding';
1
+ import { type BuiltinPlugin, BuiltinPluginName } from '../binding';
2
2
  import { RspackBuiltinPlugin } from './base';
3
3
  export declare class FlagDependencyUsagePlugin extends RspackBuiltinPlugin {
4
4
  private global;
@@ -1,4 +1,4 @@
1
- import { type BuiltinPlugin, BuiltinPluginName } from '@rspack/binding';
1
+ import { type BuiltinPlugin, BuiltinPluginName } from '../binding';
2
2
  import type { Compiler } from '../Compiler';
3
3
  import { RspackBuiltinPlugin } from './base';
4
4
  export declare class HotModuleReplacementPlugin extends RspackBuiltinPlugin {
@@ -1,4 +1,4 @@
1
- import { type BuiltinPlugin, BuiltinPluginName, type RawHttpUriPluginOptions } from '@rspack/binding';
1
+ import { type BuiltinPlugin, BuiltinPluginName, type RawHttpUriPluginOptions } from '../binding';
2
2
  import type { Compiler } from '../Compiler';
3
3
  import { RspackBuiltinPlugin } from './base';
4
4
  export type HttpUriPluginOptionsAllowedUris = (string | RegExp)[];
@@ -1,4 +1,4 @@
1
- import { type RawIgnorePluginOptions } from '@rspack/binding';
1
+ import { type RawIgnorePluginOptions } from '../binding';
2
2
  export type IgnorePluginOptions = {
3
3
  /** A RegExp to test the resource against. */
4
4
  resourceRegExp: NonNullable<RawIgnorePluginOptions['resourceRegExp']>;
@@ -1,4 +1,4 @@
1
- import { type BuiltinPlugin, BuiltinPluginName } from '@rspack/binding';
1
+ import { type BuiltinPlugin, BuiltinPluginName } from '../binding';
2
2
  import * as liteTapable from '@rspack/lite-tapable';
3
3
  import type { Chunk } from '../Chunk';
4
4
  import { type Compilation } from '../Compilation';
@@ -3,7 +3,7 @@ export declare const JsLoaderRspackPlugin: {
3
3
  new (compiler: Compiler): {
4
4
  name: string;
5
5
  _args: [compiler: Compiler];
6
- affectedHooks: keyof import("../Compiler").CompilerHooks | undefined;
6
+ affectedHooks: keyof import("..").CompilerHooks | undefined;
7
7
  raw(compiler: Compiler): import("../binding").BuiltinPlugin;
8
8
  apply(compiler: Compiler): void;
9
9
  };
@@ -1,4 +1,5 @@
1
- import { type Drafts, type FeatureOptions, type NonStandard, type PseudoClasses } from '../builtin-loader/lightningcss';
1
+ import { type Drafts, type FeatureOptions, type NonStandard, type PseudoClasses, type Targets } from '../builtin-loader/lightningcss';
2
+ import type { Compiler } from '../Compiler';
2
3
  import type { AssetConditions } from '../util/assetCondition';
3
4
  export type LightningCssMinimizerRspackPluginOptions = {
4
5
  test?: AssetConditions;
@@ -7,14 +8,9 @@ export type LightningCssMinimizerRspackPluginOptions = {
7
8
  removeUnusedLocalIdents?: boolean;
8
9
  minimizerOptions?: {
9
10
  errorRecovery?: boolean;
10
- targets?: string[] | string;
11
+ targets?: string[] | string | Targets;
11
12
  include?: FeatureOptions;
12
13
  exclude?: FeatureOptions;
13
- /**
14
- * @deprecated Use `drafts` instead.
15
- * This will be removed in the next major version.
16
- */
17
- draft?: Drafts;
18
14
  drafts?: Drafts;
19
15
  nonStandard?: NonStandard;
20
16
  pseudoClasses?: PseudoClasses;
@@ -26,7 +22,7 @@ export declare const LightningCssMinimizerRspackPlugin: {
26
22
  name: string;
27
23
  _args: [options?: LightningCssMinimizerRspackPluginOptions | undefined];
28
24
  affectedHooks: keyof import("..").CompilerHooks | undefined;
29
- raw(compiler: import("..").Compiler): import("../binding").BuiltinPlugin;
30
- apply(compiler: import("..").Compiler): void;
25
+ raw(compiler: Compiler): import("../binding").BuiltinPlugin;
26
+ apply(compiler: Compiler): void;
31
27
  };
32
28
  };
@@ -1,4 +1,4 @@
1
- import { type BuiltinPlugin, BuiltinPluginName } from '@rspack/binding';
1
+ import { type BuiltinPlugin, BuiltinPluginName } from '../binding';
2
2
  import { RspackBuiltinPlugin } from './base';
3
3
  export declare class MangleExportsPlugin extends RspackBuiltinPlugin {
4
4
  private deterministic;
@@ -1,4 +1,4 @@
1
- import { type BuiltinPlugin, BuiltinPluginName } from '@rspack/binding';
1
+ import { type BuiltinPlugin, BuiltinPluginName } from '../binding';
2
2
  import { RspackBuiltinPlugin } from './base';
3
3
  export declare class ModuleConcatenationPlugin extends RspackBuiltinPlugin {
4
4
  name: BuiltinPluginName;
@@ -1,4 +1,4 @@
1
- import { type BuiltinPlugin, BuiltinPluginName } from '@rspack/binding';
1
+ import { type BuiltinPlugin, BuiltinPluginName } from '../binding';
2
2
  import { RspackBuiltinPlugin } from './base';
3
3
  export declare class NaturalChunkIdsPlugin extends RspackBuiltinPlugin {
4
4
  name: BuiltinPluginName;
@@ -1,4 +1,4 @@
1
- import { type BuiltinPlugin, BuiltinPluginName } from '@rspack/binding';
1
+ import { type BuiltinPlugin, BuiltinPluginName } from '../binding';
2
2
  import { RspackBuiltinPlugin } from './base';
3
3
  export declare class NaturalModuleIdsPlugin extends RspackBuiltinPlugin {
4
4
  name: BuiltinPluginName;
@@ -1,4 +1,4 @@
1
- import { type RawOccurrenceChunkIdsPluginOptions } from '@rspack/binding';
1
+ import { type RawOccurrenceChunkIdsPluginOptions } from '../binding';
2
2
  export declare const OccurrenceChunkIdsPlugin: {
3
3
  new (options?: RawOccurrenceChunkIdsPluginOptions | undefined): {
4
4
  name: string;
@@ -1,4 +1,4 @@
1
- import { type RawProgressPluginOptions } from '@rspack/binding';
1
+ import { type RawProgressPluginOptions } from '../binding';
2
2
  export type ProgressPluginArgument = Partial<Omit<RawProgressPluginOptions, 'handler'>> | ((percentage: number, msg: string, ...args: string[]) => void) | undefined;
3
3
  export declare const ProgressPlugin: {
4
4
  new (progress?: ProgressPluginArgument): {
@@ -1,4 +1,4 @@
1
- import { type JsRsdoctorAsset, type JsRsdoctorAssetPatch, type JsRsdoctorChunk, type JsRsdoctorChunkAssets, type JsRsdoctorChunkGraph, type JsRsdoctorChunkModules, type JsRsdoctorDependency, type JsRsdoctorEntrypoint, type JsRsdoctorEntrypointAssets, type JsRsdoctorExportInfo, type JsRsdoctorModule, type JsRsdoctorModuleGraph, type JsRsdoctorModuleGraphModule, type JsRsdoctorModuleIdsPatch, type JsRsdoctorModuleOriginalSource, type JsRsdoctorModuleSourcesPatch, type JsRsdoctorSideEffect, type JsRsdoctorSourcePosition, type JsRsdoctorSourceRange, type JsRsdoctorStatement, type JsRsdoctorVariable } from '@rspack/binding';
1
+ import { type JsRsdoctorAsset, type JsRsdoctorAssetPatch, type JsRsdoctorChunk, type JsRsdoctorChunkAssets, type JsRsdoctorChunkGraph, type JsRsdoctorChunkModules, type JsRsdoctorDependency, type JsRsdoctorEntrypoint, type JsRsdoctorEntrypointAssets, type JsRsdoctorExportInfo, type JsRsdoctorModule, type JsRsdoctorModuleGraph, type JsRsdoctorModuleGraphModule, type JsRsdoctorModuleIdsPatch, type JsRsdoctorModuleOriginalSource, type JsRsdoctorModuleSourcesPatch, type JsRsdoctorSideEffect, type JsRsdoctorSourcePosition, type JsRsdoctorSourceRange, type JsRsdoctorStatement, type JsRsdoctorVariable } from '../binding';
2
2
  import * as liteTapable from '@rspack/lite-tapable';
3
3
  import { type Compilation } from '../Compilation';
4
4
  import type { Compiler } from '../Compiler';
@@ -18,7 +18,7 @@ declare const RsdoctorPluginImpl: {
18
18
  new (c?: RsdoctorPluginOptions | undefined): {
19
19
  name: string;
20
20
  _args: [c?: RsdoctorPluginOptions | undefined];
21
- affectedHooks: keyof import("../Compiler").CompilerHooks | undefined;
21
+ affectedHooks: keyof import("..").CompilerHooks | undefined;
22
22
  raw(compiler: Compiler): import("../binding").BuiltinPlugin;
23
23
  apply(compiler: Compiler): void;
24
24
  };
@@ -39,10 +39,6 @@ export type RsdoctorPluginHooks = {
39
39
  assets: liteTapable.AsyncSeriesBailHook<[JsRsdoctorAssetPatch], false | void>;
40
40
  };
41
41
  declare const RsdoctorPlugin: typeof RsdoctorPluginImpl & {
42
- /**
43
- * @deprecated Use `getCompilationHooks` instead.
44
- */
45
- getHooks: (compilation: Compilation) => RsdoctorPluginHooks;
46
42
  getCompilationHooks: (compilation: Compilation) => RsdoctorPluginHooks;
47
43
  };
48
44
  export declare const createRsdoctorPluginHooksRegisters: CreatePartialRegisters<`RsdoctorPlugin`>;
@@ -1,4 +1,4 @@
1
- import { type RawRslibPluginOptions } from '@rspack/binding';
1
+ import { type RawRslibPluginOptions } from '../binding';
2
2
  export type RslibPluginArgument = Partial<Omit<RawRslibPluginOptions, 'handler'>> | ((percentage: number, msg: string, ...args: string[]) => void) | undefined;
3
3
  export declare const RslibPlugin: {
4
4
  new (rslib: RawRslibPluginOptions): {