@rspack/core 1.2.6 → 1.2.7-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.
@@ -8,7 +8,8 @@
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
10
  import type * as binding from "@rspack/binding";
11
- import { type ExternalObject, type JsCompilation, type JsRuntimeModule } from "@rspack/binding";
11
+ import { type AssetInfo, type ExternalObject, type JsCompilation, type JsRuntimeModule } from "@rspack/binding";
12
+ export type { AssetInfo } from "@rspack/binding";
12
13
  import * as liteTapable from "@rspack/lite-tapable";
13
14
  import type { Source } from "../compiled/webpack-sources";
14
15
  import { Chunk } from "./Chunk";
@@ -31,10 +32,8 @@ import WebpackError from "./lib/WebpackError";
31
32
  import { Logger } from "./logging/Logger";
32
33
  import { StatsFactory } from "./stats/StatsFactory";
33
34
  import { StatsPrinter } from "./stats/StatsPrinter";
34
- import { type AssetInfo } from "./util/AssetInfo";
35
35
  import type { InputFileSystem } from "./util/fs";
36
36
  import type Hash from "./util/hash";
37
- export type { AssetInfo } from "./util/AssetInfo";
38
37
  export type Assets = Record<string, Source>;
39
38
  export interface Asset {
40
39
  name: string;
@@ -142,6 +142,11 @@ declare class Compiler {
142
142
  */
143
143
  createChildCompiler(compilation: Compilation, compilerName: string, compilerIndex: number, outputOptions: OutputNormalized, plugins: RspackPluginInstance[]): Compiler;
144
144
  isChild(): boolean;
145
+ /**
146
+ * Create a compilation and run it, which is the basic method that `compiler.run` and `compiler.watch` depend on.
147
+ * TODO: make this method private in the next major release
148
+ * @private this method is only used in Rspack core
149
+ */
145
150
  compile(callback: liteTapable.Callback<Error, Compilation>): void;
146
151
  close(callback: (error?: Error | null) => void): void;
147
152
  /**
package/dist/Module.d.ts CHANGED
@@ -1,9 +1,8 @@
1
- import type { JsCodegenerationResult, JsContextModuleFactoryAfterResolveData, JsContextModuleFactoryBeforeResolveData, JsCreateData, JsFactoryMeta, JsLibIdentOptions } from "@rspack/binding";
1
+ import type { AssetInfo, JsCodegenerationResult, JsContextModuleFactoryAfterResolveData, JsContextModuleFactoryBeforeResolveData, JsCreateData, JsFactoryMeta, JsLibIdentOptions } from "@rspack/binding";
2
2
  import type { JsModule } from "@rspack/binding";
3
3
  import type { Source } from "../compiled/webpack-sources";
4
4
  import { DependenciesBlock } from "./DependenciesBlock";
5
5
  import { Dependency } from "./Dependency";
6
- import { type AssetInfo } from "./util/AssetInfo";
7
6
  export type ResourceData = {
8
7
  resource: string;
9
8
  path: string;
@@ -85,7 +84,7 @@ export declare class Module {
85
84
  nameForCondition(): string | null;
86
85
  size(type?: string): number;
87
86
  libIdent(options: JsLibIdentOptions): string | null;
88
- emitFile(filename: string, source: Source, assetInfo: AssetInfo): void;
87
+ emitFile(filename: string, source: Source, assetInfo?: AssetInfo): void;
89
88
  }
90
89
  export declare class CodeGenerationResult {
91
90
  #private;
@@ -1,4 +1,4 @@
1
- import type { JsAssetInfo, RawModuleRuleUse, RawOptions } from "@rspack/binding";
1
+ import type { AssetInfo, RawModuleRuleUse, RawOptions } from "@rspack/binding";
2
2
  import type { ResolveRequest } from "../../compiled/enhanced-resolve";
3
3
  import type { Compilation } from "../Compilation";
4
4
  import type { Compiler } from "../Compiler";
@@ -73,21 +73,83 @@ export interface ImportModuleOptions {
73
73
  baseUri?: string;
74
74
  }
75
75
  export interface LoaderContext<OptionsType = {}> {
76
+ /**
77
+ * The version number of the loader API. Currently 2.
78
+ * This is useful for providing backwards compatibility. Using the version you can specify
79
+ * custom logic or fallbacks for breaking changes.
80
+ */
76
81
  version: 2;
82
+ /**
83
+ * The path string of the current module.
84
+ * @example `'/abc/resource.js?query#hash'`.
85
+ */
77
86
  resource: string;
87
+ /**
88
+ * The path string of the current module, excluding the query and fragment parameters.
89
+ * @example `'/abc/resource.js?query#hash'` in `'/abc/resource.js'`.
90
+ */
78
91
  resourcePath: string;
92
+ /**
93
+ * The query parameter for the path string of the current module.
94
+ * @example `'?query'` in `'/abc/resource.js?query#hash'`.
95
+ */
79
96
  resourceQuery: string;
97
+ /**
98
+ * The fragment parameter of the current module's path string.
99
+ * @example `'#hash'` in `'/abc/resource.js?query#hash'`.
100
+ */
80
101
  resourceFragment: string;
102
+ /**
103
+ * Tells Rspack that this loader will be called asynchronously. Returns `this.callback`.
104
+ */
81
105
  async(): LoaderContextCallback;
106
+ /**
107
+ * A function that can be called synchronously or asynchronously in order to return multiple
108
+ * results. The expected arguments are:
109
+ *
110
+ * 1. The first parameter must be `Error` or `null`, which marks the current module as a
111
+ * compilation failure.
112
+ * 2. The second argument is a `string` or `Buffer`, which indicates the contents of the file
113
+ * after the module has been processed by the loader.
114
+ * 3. The third parameter is a source map that can be processed by the loader.
115
+ * 4. The fourth parameter is ignored by Rspack and can be anything (e.g. some metadata).
116
+ */
82
117
  callback: LoaderContextCallback;
118
+ /**
119
+ * A function that sets the cacheable flag.
120
+ * By default, the processing results of the loader are marked as cacheable.
121
+ * Calling this method and passing `false` turns off the loader's ability to
122
+ * cache processing results.
123
+ */
83
124
  cacheable(cacheable?: boolean): void;
125
+ /**
126
+ * Tells if source map should be generated. Since generating source maps can be an expensive task,
127
+ * you should check if source maps are actually requested.
128
+ */
84
129
  sourceMap: boolean;
130
+ /**
131
+ * The base path configured in Rspack config via `context`.
132
+ */
85
133
  rootContext: string;
134
+ /**
135
+ * The directory path of the currently processed module, which changes with the
136
+ * location of each processed module.
137
+ * For example, if the loader is processing `/project/src/components/Button.js`,
138
+ * then the value of `this.context` would be `/project/src/components`.
139
+ */
86
140
  context: string | null;
141
+ /**
142
+ * The index in the loaders array of the current loader.
143
+ */
87
144
  loaderIndex: number;
88
145
  remainingRequest: string;
89
146
  currentRequest: string;
90
147
  previousRequest: string;
148
+ /**
149
+ * The module specifier string after being resolved.
150
+ * For example, if a `resource.js` is processed by `loader1.js` and `loader2.js`, the value of
151
+ * `this.request` will be `/path/to/loader1.js!/path/to/loader2.js!/path/to/resource.js`.
152
+ */
91
153
  request: string;
92
154
  /**
93
155
  * An array of all the loaders. It is writeable in the pitch phase.
@@ -108,23 +170,80 @@ export interface LoaderContext<OptionsType = {}> {
108
170
  * ]
109
171
  */
110
172
  loaders: LoaderObject[];
173
+ /**
174
+ * The value of `mode` is read when Rspack is run.
175
+ * The possible values are: `'production'`, `'development'`, `'none'`
176
+ */
111
177
  mode?: Mode;
178
+ /**
179
+ * The current compilation target. Passed from `target` configuration options.
180
+ */
112
181
  target?: Target;
182
+ /**
183
+ * Whether HMR is enabled.
184
+ */
113
185
  hot?: boolean;
114
186
  /**
115
- * @param schema To provide the best performance, Rspack does not perform the schema validation. If your loader requires schema validation, please call scheme-utils or zod on your own.
187
+ * Get the options passed in by the loader's user.
188
+ * @param schema To provide the best performance, Rspack does not perform the schema
189
+ * validation. If your loader requires schema validation, please call scheme-utils or
190
+ * zod on your own.
116
191
  */
117
192
  getOptions(schema?: any): OptionsType;
193
+ /**
194
+ * Resolve a module specifier.
195
+ * @param context The absolute path to a directory. This directory is used as the starting
196
+ * location for resolving.
197
+ * @param request The module specifier to be resolved.
198
+ * @param callback A callback function that gives the resolved path.
199
+ */
118
200
  resolve(context: string, request: string, callback: (arg0: null | Error, arg1?: string | false, arg2?: ResolveRequest) => void): void;
201
+ /**
202
+ * Create a resolver like `this.resolve`.
203
+ */
119
204
  getResolve(options: Resolve): ((context: string, request: string, callback: ResolveCallback) => void) | ((context: string, request: string) => Promise<string | false | undefined>);
205
+ /**
206
+ * Get the logger of this compilation, through which messages can be logged.
207
+ */
120
208
  getLogger(name: string): Logger;
209
+ /**
210
+ * Emit an error. Unlike `throw` and `this.callback(err)` in the loader, it does not
211
+ * mark the current module as a compilation failure, it just adds an error to Rspack's
212
+ * Compilation and displays it on the command line at the end of this compilation.
213
+ */
121
214
  emitError(error: Error): void;
215
+ /**
216
+ * Emit a warning.
217
+ */
122
218
  emitWarning(warning: Error): void;
123
- emitFile(name: string, content: string | Buffer, sourceMap?: string, assetInfo?: JsAssetInfo): void;
219
+ /**
220
+ * Emit a new file. This method allows you to create new files during the loader execution.
221
+ */
222
+ emitFile(name: string, content: string | Buffer, sourceMap?: string, assetInfo?: AssetInfo): void;
223
+ /**
224
+ * Add a file as a dependency on the loader results so that any changes to them can be listened to.
225
+ * For example, `sass-loader`, `less-loader` use this trick to recompile when the imported style
226
+ * files change.
227
+ */
124
228
  addDependency(file: string): void;
229
+ /**
230
+ * Alias of `this.addDependency()`.
231
+ */
125
232
  dependency(file: string): void;
233
+ /**
234
+ * Add the directory as a dependency for the loader results so that any changes to the
235
+ * files in the directory can be listened to.
236
+ */
126
237
  addContextDependency(context: string): void;
238
+ /**
239
+ * Add a currently non-existent file as a dependency of the loader result, so that its
240
+ * creation and any changes can be listened. For example, when a new file is created at
241
+ * that path, it will trigger a rebuild.
242
+ */
127
243
  addMissingDependency(missing: string): void;
244
+ /**
245
+ * Removes all dependencies of the loader result.
246
+ */
128
247
  clearDependencies(): void;
129
248
  getDependencies(): string[];
130
249
  getContextDependencies(): string[];
@@ -145,24 +264,58 @@ export interface LoaderContext<OptionsType = {}> {
145
264
  */
146
265
  importModule<T = any>(request: string, options: ImportModuleOptions | undefined, callback: (err?: null | Error, exports?: T) => any): void;
147
266
  importModule<T = any>(request: string, options?: ImportModuleOptions): Promise<T>;
267
+ /**
268
+ * Access to the `compilation` object's `inputFileSystem` property.
269
+ */
148
270
  fs: any;
149
271
  /**
150
272
  * This is an experimental API and maybe subject to change.
151
273
  * @experimental
152
274
  */
153
275
  experiments: LoaderExperiments;
276
+ /**
277
+ * Access to some utilities.
278
+ */
154
279
  utils: {
280
+ /**
281
+ * Return a new request string using absolute paths when possible.
282
+ */
155
283
  absolutify: (context: string, request: string) => string;
284
+ /**
285
+ * Return a new request string avoiding absolute paths when possible.
286
+ */
156
287
  contextify: (context: string, request: string) => string;
288
+ /**
289
+ * Return a new Hash object from provided hash function.
290
+ */
157
291
  createHash: (algorithm?: string) => Hash;
158
292
  };
293
+ /**
294
+ * The value depends on the loader configuration:
295
+ * - If the current loader was configured with an options object, `this.query` will
296
+ * point to that object.
297
+ * - If the current loader has no options, but was invoked with a query string, this
298
+ * will be a string starting with `?`.
299
+ */
159
300
  query: string | OptionsType;
301
+ /**
302
+ * A data object shared between the pitch and the normal phase.
303
+ */
160
304
  data: unknown;
305
+ /**
306
+ * Access to the current Compiler object of Rspack.
307
+ */
161
308
  _compiler: Compiler;
309
+ /**
310
+ * Access to the current Compilation object of Rspack.
311
+ */
162
312
  _compilation: Compilation;
313
+ /**
314
+ * @deprecated Hacky access to the Module object being loaded.
315
+ */
163
316
  _module: Module;
164
317
  /**
165
- * Note: This is not a webpack public API, maybe removed in future.
318
+ * Note: This is not a Rspack public API, maybe removed in future.
166
319
  * Store some data from loader, and consume it from parser, it may be removed in the future
167
320
  *
168
321
  * @internal
@@ -1,4 +1,4 @@
1
- import type { JsAssetInfo, RawFuncUseCtx } from "@rspack/binding";
1
+ import type { AssetInfo, RawFuncUseCtx } from "@rspack/binding";
2
2
  import type * as webpackDevServer from "webpack-dev-server";
3
3
  import type { ChunkGraph } from "../ChunkGraph";
4
4
  import type { Compilation, PathData } from "../Compilation";
@@ -8,7 +8,7 @@ import type ModuleGraph from "../ModuleGraph";
8
8
  import type { LazyCompilationDefaultBackendOptions } from "../builtin-plugin/lazy-compilation/backend";
9
9
  import type { Chunk } from "../exports";
10
10
  export type FilenameTemplate = string;
11
- export type Filename = FilenameTemplate | ((pathData: PathData, assetInfo?: JsAssetInfo) => string);
11
+ export type Filename = FilenameTemplate | ((pathData: PathData, assetInfo?: AssetInfo) => string);
12
12
  /** Name of the configuration. Used when loading multiple configurations. */
13
13
  export type Name = string;
14
14
  /** A list of name defining all sibling configurations it depends on. Dependent configurations need to be compiled first. */
@@ -1,4 +1,4 @@
1
- import type { JsAssetInfo } from "@rspack/binding";
1
+ import type { AssetInfo } from "@rspack/binding";
2
2
  import { z } from "../../compiled/zod";
3
3
  import { Chunk } from "../Chunk";
4
4
  import { ChunkGraph } from "../ChunkGraph";
@@ -14,12 +14,12 @@ export declare const rspackOptions: z.ZodObject<{
14
14
  entry: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
15
15
  import: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
16
16
  runtime: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodString]>>;
17
- publicPath: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<JsAssetInfo, z.ZodTypeDef, JsAssetInfo>>], z.ZodUnknown>, z.ZodString>]>]>>;
17
+ publicPath: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<AssetInfo, z.ZodTypeDef, AssetInfo>>], z.ZodUnknown>, z.ZodString>]>]>>;
18
18
  baseUri: z.ZodOptional<z.ZodString>;
19
19
  chunkLoading: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodUnion<[z.ZodEnum<["jsonp", "import-scripts", "require", "async-node", "import"]>, z.ZodString]>]>>;
20
20
  asyncChunks: z.ZodOptional<z.ZodBoolean>;
21
21
  wasmLoading: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodUnion<[z.ZodEnum<["fetch-streaming", "fetch", "async-node"]>, z.ZodString]>]>>;
22
- filename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<JsAssetInfo, z.ZodTypeDef, JsAssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
22
+ filename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<AssetInfo, z.ZodTypeDef, AssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
23
23
  library: z.ZodOptional<z.ZodObject<{
24
24
  amdContainer: z.ZodOptional<z.ZodString>;
25
25
  auxiliaryComment: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
@@ -95,9 +95,9 @@ export declare const rspackOptions: z.ZodObject<{
95
95
  runtime?: string | false | undefined;
96
96
  chunkLoading?: string | false | undefined;
97
97
  asyncChunks?: boolean | undefined;
98
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
98
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
99
99
  baseUri?: string | undefined;
100
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
100
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
101
101
  library?: {
102
102
  type: string;
103
103
  name?: string | string[] | {
@@ -123,9 +123,9 @@ export declare const rspackOptions: z.ZodObject<{
123
123
  runtime?: string | false | undefined;
124
124
  chunkLoading?: string | false | undefined;
125
125
  asyncChunks?: boolean | undefined;
126
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
126
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
127
127
  baseUri?: string | undefined;
128
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
128
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
129
129
  library?: {
130
130
  type: string;
131
131
  name?: string | string[] | {
@@ -148,12 +148,12 @@ export declare const rspackOptions: z.ZodObject<{
148
148
  }>]>>, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>]>, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
149
149
  import: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
150
150
  runtime: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodString]>>;
151
- publicPath: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<JsAssetInfo, z.ZodTypeDef, JsAssetInfo>>], z.ZodUnknown>, z.ZodString>]>]>>;
151
+ publicPath: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<AssetInfo, z.ZodTypeDef, AssetInfo>>], z.ZodUnknown>, z.ZodString>]>]>>;
152
152
  baseUri: z.ZodOptional<z.ZodString>;
153
153
  chunkLoading: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodUnion<[z.ZodEnum<["jsonp", "import-scripts", "require", "async-node", "import"]>, z.ZodString]>]>>;
154
154
  asyncChunks: z.ZodOptional<z.ZodBoolean>;
155
155
  wasmLoading: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodUnion<[z.ZodEnum<["fetch-streaming", "fetch", "async-node"]>, z.ZodString]>]>>;
156
- filename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<JsAssetInfo, z.ZodTypeDef, JsAssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
156
+ filename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<AssetInfo, z.ZodTypeDef, AssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
157
157
  library: z.ZodOptional<z.ZodObject<{
158
158
  amdContainer: z.ZodOptional<z.ZodString>;
159
159
  auxiliaryComment: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
@@ -229,9 +229,9 @@ export declare const rspackOptions: z.ZodObject<{
229
229
  runtime?: string | false | undefined;
230
230
  chunkLoading?: string | false | undefined;
231
231
  asyncChunks?: boolean | undefined;
232
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
232
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
233
233
  baseUri?: string | undefined;
234
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
234
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
235
235
  library?: {
236
236
  type: string;
237
237
  name?: string | string[] | {
@@ -257,9 +257,9 @@ export declare const rspackOptions: z.ZodObject<{
257
257
  runtime?: string | false | undefined;
258
258
  chunkLoading?: string | false | undefined;
259
259
  asyncChunks?: boolean | undefined;
260
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
260
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
261
261
  baseUri?: string | undefined;
262
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
262
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
263
263
  library?: {
264
264
  type: string;
265
265
  name?: string | string[] | {
@@ -282,12 +282,12 @@ export declare const rspackOptions: z.ZodObject<{
282
282
  }>]>>, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>]>, z.ZodPromise<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
283
283
  import: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
284
284
  runtime: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodString]>>;
285
- publicPath: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<JsAssetInfo, z.ZodTypeDef, JsAssetInfo>>], z.ZodUnknown>, z.ZodString>]>]>>;
285
+ publicPath: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<AssetInfo, z.ZodTypeDef, AssetInfo>>], z.ZodUnknown>, z.ZodString>]>]>>;
286
286
  baseUri: z.ZodOptional<z.ZodString>;
287
287
  chunkLoading: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodUnion<[z.ZodEnum<["jsonp", "import-scripts", "require", "async-node", "import"]>, z.ZodString]>]>>;
288
288
  asyncChunks: z.ZodOptional<z.ZodBoolean>;
289
289
  wasmLoading: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodUnion<[z.ZodEnum<["fetch-streaming", "fetch", "async-node"]>, z.ZodString]>]>>;
290
- filename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<JsAssetInfo, z.ZodTypeDef, JsAssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
290
+ filename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<AssetInfo, z.ZodTypeDef, AssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
291
291
  library: z.ZodOptional<z.ZodObject<{
292
292
  amdContainer: z.ZodOptional<z.ZodString>;
293
293
  auxiliaryComment: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
@@ -363,9 +363,9 @@ export declare const rspackOptions: z.ZodObject<{
363
363
  runtime?: string | false | undefined;
364
364
  chunkLoading?: string | false | undefined;
365
365
  asyncChunks?: boolean | undefined;
366
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
366
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
367
367
  baseUri?: string | undefined;
368
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
368
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
369
369
  library?: {
370
370
  type: string;
371
371
  name?: string | string[] | {
@@ -391,9 +391,9 @@ export declare const rspackOptions: z.ZodObject<{
391
391
  runtime?: string | false | undefined;
392
392
  chunkLoading?: string | false | undefined;
393
393
  asyncChunks?: boolean | undefined;
394
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
394
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
395
395
  baseUri?: string | undefined;
396
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
396
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
397
397
  library?: {
398
398
  type: string;
399
399
  name?: string | string[] | {
@@ -424,17 +424,17 @@ export declare const rspackOptions: z.ZodObject<{
424
424
  }, {
425
425
  keep?: string | undefined;
426
426
  }>]>>;
427
- publicPath: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<JsAssetInfo, z.ZodTypeDef, JsAssetInfo>>], z.ZodUnknown>, z.ZodString>]>]>>;
428
- filename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<JsAssetInfo, z.ZodTypeDef, JsAssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
429
- chunkFilename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<JsAssetInfo, z.ZodTypeDef, JsAssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
427
+ publicPath: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<AssetInfo, z.ZodTypeDef, AssetInfo>>], z.ZodUnknown>, z.ZodString>]>]>>;
428
+ filename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<AssetInfo, z.ZodTypeDef, AssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
429
+ chunkFilename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<AssetInfo, z.ZodTypeDef, AssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
430
430
  crossOriginLoading: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodEnum<["anonymous", "use-credentials"]>]>>;
431
- cssFilename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<JsAssetInfo, z.ZodTypeDef, JsAssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
431
+ cssFilename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<AssetInfo, z.ZodTypeDef, AssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
432
432
  cssHeadDataCompression: z.ZodOptional<z.ZodBoolean>;
433
- cssChunkFilename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<JsAssetInfo, z.ZodTypeDef, JsAssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
433
+ cssChunkFilename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<AssetInfo, z.ZodTypeDef, AssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
434
434
  hotUpdateMainFilename: z.ZodOptional<z.ZodString>;
435
435
  hotUpdateChunkFilename: z.ZodOptional<z.ZodString>;
436
436
  hotUpdateGlobal: z.ZodOptional<z.ZodString>;
437
- assetModuleFilename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<JsAssetInfo, z.ZodTypeDef, JsAssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
437
+ assetModuleFilename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<AssetInfo, z.ZodTypeDef, AssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
438
438
  uniqueName: z.ZodOptional<z.ZodString>;
439
439
  chunkLoadingGlobal: z.ZodOptional<z.ZodString>;
440
440
  enabledLibraryTypes: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<["var", "module", "assign", "assign-properties", "this", "window", "self", "global", "commonjs", "commonjs2", "commonjs-module", "commonjs-static", "amd", "amd-require", "umd", "umd2", "jsonp", "system"]>, z.ZodString]>, "many">>;
@@ -626,8 +626,8 @@ export declare const rspackOptions: z.ZodObject<{
626
626
  path?: string | undefined;
627
627
  chunkLoading?: string | false | undefined;
628
628
  asyncChunks?: boolean | undefined;
629
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
630
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
629
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
630
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
631
631
  library?: string | string[] | {
632
632
  commonjs?: string | undefined;
633
633
  amd?: string | undefined;
@@ -662,14 +662,14 @@ export declare const rspackOptions: z.ZodObject<{
662
662
  clean?: boolean | {
663
663
  keep?: string | undefined;
664
664
  } | undefined;
665
- chunkFilename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
665
+ chunkFilename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
666
666
  crossOriginLoading?: false | "anonymous" | "use-credentials" | undefined;
667
- cssFilename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
668
- cssChunkFilename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
667
+ cssFilename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
668
+ cssChunkFilename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
669
669
  hotUpdateMainFilename?: string | undefined;
670
670
  hotUpdateChunkFilename?: string | undefined;
671
671
  hotUpdateGlobal?: string | undefined;
672
- assetModuleFilename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
672
+ assetModuleFilename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
673
673
  uniqueName?: string | undefined;
674
674
  chunkLoadingGlobal?: string | undefined;
675
675
  enabledLibraryTypes?: string[] | undefined;
@@ -725,8 +725,8 @@ export declare const rspackOptions: z.ZodObject<{
725
725
  path?: string | undefined;
726
726
  chunkLoading?: string | false | undefined;
727
727
  asyncChunks?: boolean | undefined;
728
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
729
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
728
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
729
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
730
730
  library?: string | string[] | {
731
731
  commonjs?: string | undefined;
732
732
  amd?: string | undefined;
@@ -761,14 +761,14 @@ export declare const rspackOptions: z.ZodObject<{
761
761
  clean?: boolean | {
762
762
  keep?: string | undefined;
763
763
  } | undefined;
764
- chunkFilename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
764
+ chunkFilename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
765
765
  crossOriginLoading?: false | "anonymous" | "use-credentials" | undefined;
766
- cssFilename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
767
- cssChunkFilename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
766
+ cssFilename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
767
+ cssChunkFilename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
768
768
  hotUpdateMainFilename?: string | undefined;
769
769
  hotUpdateChunkFilename?: string | undefined;
770
770
  hotUpdateGlobal?: string | undefined;
771
- assetModuleFilename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
771
+ assetModuleFilename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
772
772
  uniqueName?: string | undefined;
773
773
  chunkLoadingGlobal?: string | undefined;
774
774
  enabledLibraryTypes?: string[] | undefined;
@@ -1542,7 +1542,7 @@ export declare const rspackOptions: z.ZodObject<{
1542
1542
  minChunks: z.ZodOptional<z.ZodNumber>;
1543
1543
  usedExports: z.ZodOptional<z.ZodBoolean>;
1544
1544
  name: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodLiteral<false>]>, z.ZodFunction<z.ZodTuple<[z.ZodType<Module, z.ZodTypeDef, Module>, z.ZodArray<z.ZodType<Chunk, z.ZodTypeDef, Chunk>, "many">, z.ZodString], z.ZodUnknown>, z.ZodOptional<z.ZodString>>]>>;
1545
- filename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<JsAssetInfo, z.ZodTypeDef, JsAssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
1545
+ filename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<AssetInfo, z.ZodTypeDef, AssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
1546
1546
  minSize: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodRecord<z.ZodString, z.ZodNumber>]>>;
1547
1547
  maxSize: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodRecord<z.ZodString, z.ZodNumber>]>>;
1548
1548
  maxAsyncSize: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodRecord<z.ZodString, z.ZodNumber>]>>;
@@ -1556,7 +1556,7 @@ export declare const rspackOptions: z.ZodObject<{
1556
1556
  minChunks: z.ZodOptional<z.ZodNumber>;
1557
1557
  usedExports: z.ZodOptional<z.ZodBoolean>;
1558
1558
  name: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodLiteral<false>]>, z.ZodFunction<z.ZodTuple<[z.ZodType<Module, z.ZodTypeDef, Module>, z.ZodArray<z.ZodType<Chunk, z.ZodTypeDef, Chunk>, "many">, z.ZodString], z.ZodUnknown>, z.ZodOptional<z.ZodString>>]>>;
1559
- filename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<JsAssetInfo, z.ZodTypeDef, JsAssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
1559
+ filename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<AssetInfo, z.ZodTypeDef, AssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
1560
1560
  minSize: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodRecord<z.ZodString, z.ZodNumber>]>>;
1561
1561
  maxSize: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodRecord<z.ZodString, z.ZodNumber>]>>;
1562
1562
  maxAsyncSize: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodRecord<z.ZodString, z.ZodNumber>]>>;
@@ -1585,7 +1585,7 @@ export declare const rspackOptions: z.ZodObject<{
1585
1585
  layer?: string | RegExp | ((args_0: string | undefined) => boolean) | undefined;
1586
1586
  chunks?: RegExp | "initial" | "async" | "all" | ((args_0: Chunk, ...args: unknown[]) => boolean) | undefined;
1587
1587
  name?: string | false | ((args_0: Module, args_1: Chunk[], args_2: string, ...args: unknown[]) => string | undefined) | undefined;
1588
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
1588
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
1589
1589
  usedExports?: boolean | undefined;
1590
1590
  defaultSizeTypes?: string[] | undefined;
1591
1591
  maxSize?: number | Record<string, number> | undefined;
@@ -1609,7 +1609,7 @@ export declare const rspackOptions: z.ZodObject<{
1609
1609
  layer?: string | RegExp | ((args_0: string | undefined) => boolean) | undefined;
1610
1610
  chunks?: RegExp | "initial" | "async" | "all" | ((args_0: Chunk, ...args: unknown[]) => boolean) | undefined;
1611
1611
  name?: string | false | ((args_0: Module, args_1: Chunk[], args_2: string, ...args: unknown[]) => string | undefined) | undefined;
1612
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
1612
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
1613
1613
  usedExports?: boolean | undefined;
1614
1614
  defaultSizeTypes?: string[] | undefined;
1615
1615
  maxSize?: number | Record<string, number> | undefined;
@@ -1655,7 +1655,7 @@ export declare const rspackOptions: z.ZodObject<{
1655
1655
  }, "strict", z.ZodTypeAny, {
1656
1656
  chunks?: RegExp | "initial" | "async" | "all" | ((args_0: Chunk, ...args: unknown[]) => boolean) | undefined;
1657
1657
  name?: string | false | ((args_0: Module, args_1: Chunk[], args_2: string, ...args: unknown[]) => string | undefined) | undefined;
1658
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
1658
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
1659
1659
  usedExports?: boolean | undefined;
1660
1660
  defaultSizeTypes?: string[] | undefined;
1661
1661
  cacheGroups?: Record<string, false | {
@@ -1663,7 +1663,7 @@ export declare const rspackOptions: z.ZodObject<{
1663
1663
  layer?: string | RegExp | ((args_0: string | undefined) => boolean) | undefined;
1664
1664
  chunks?: RegExp | "initial" | "async" | "all" | ((args_0: Chunk, ...args: unknown[]) => boolean) | undefined;
1665
1665
  name?: string | false | ((args_0: Module, args_1: Chunk[], args_2: string, ...args: unknown[]) => string | undefined) | undefined;
1666
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
1666
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
1667
1667
  usedExports?: boolean | undefined;
1668
1668
  defaultSizeTypes?: string[] | undefined;
1669
1669
  maxSize?: number | Record<string, number> | undefined;
@@ -1703,7 +1703,7 @@ export declare const rspackOptions: z.ZodObject<{
1703
1703
  }, {
1704
1704
  chunks?: RegExp | "initial" | "async" | "all" | ((args_0: Chunk, ...args: unknown[]) => boolean) | undefined;
1705
1705
  name?: string | false | ((args_0: Module, args_1: Chunk[], args_2: string, ...args: unknown[]) => string | undefined) | undefined;
1706
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
1706
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
1707
1707
  usedExports?: boolean | undefined;
1708
1708
  defaultSizeTypes?: string[] | undefined;
1709
1709
  cacheGroups?: Record<string, false | {
@@ -1711,7 +1711,7 @@ export declare const rspackOptions: z.ZodObject<{
1711
1711
  layer?: string | RegExp | ((args_0: string | undefined) => boolean) | undefined;
1712
1712
  chunks?: RegExp | "initial" | "async" | "all" | ((args_0: Chunk, ...args: unknown[]) => boolean) | undefined;
1713
1713
  name?: string | false | ((args_0: Module, args_1: Chunk[], args_2: string, ...args: unknown[]) => string | undefined) | undefined;
1714
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
1714
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
1715
1715
  usedExports?: boolean | undefined;
1716
1716
  defaultSizeTypes?: string[] | undefined;
1717
1717
  maxSize?: number | Record<string, number> | undefined;
@@ -1790,7 +1790,7 @@ export declare const rspackOptions: z.ZodObject<{
1790
1790
  splitChunks?: false | {
1791
1791
  chunks?: RegExp | "initial" | "async" | "all" | ((args_0: Chunk, ...args: unknown[]) => boolean) | undefined;
1792
1792
  name?: string | false | ((args_0: Module, args_1: Chunk[], args_2: string, ...args: unknown[]) => string | undefined) | undefined;
1793
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
1793
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
1794
1794
  usedExports?: boolean | undefined;
1795
1795
  defaultSizeTypes?: string[] | undefined;
1796
1796
  cacheGroups?: Record<string, false | {
@@ -1798,7 +1798,7 @@ export declare const rspackOptions: z.ZodObject<{
1798
1798
  layer?: string | RegExp | ((args_0: string | undefined) => boolean) | undefined;
1799
1799
  chunks?: RegExp | "initial" | "async" | "all" | ((args_0: Chunk, ...args: unknown[]) => boolean) | undefined;
1800
1800
  name?: string | false | ((args_0: Module, args_1: Chunk[], args_2: string, ...args: unknown[]) => string | undefined) | undefined;
1801
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
1801
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
1802
1802
  usedExports?: boolean | undefined;
1803
1803
  defaultSizeTypes?: string[] | undefined;
1804
1804
  maxSize?: number | Record<string, number> | undefined;
@@ -1862,7 +1862,7 @@ export declare const rspackOptions: z.ZodObject<{
1862
1862
  splitChunks?: false | {
1863
1863
  chunks?: RegExp | "initial" | "async" | "all" | ((args_0: Chunk, ...args: unknown[]) => boolean) | undefined;
1864
1864
  name?: string | false | ((args_0: Module, args_1: Chunk[], args_2: string, ...args: unknown[]) => string | undefined) | undefined;
1865
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
1865
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
1866
1866
  usedExports?: boolean | undefined;
1867
1867
  defaultSizeTypes?: string[] | undefined;
1868
1868
  cacheGroups?: Record<string, false | {
@@ -1870,7 +1870,7 @@ export declare const rspackOptions: z.ZodObject<{
1870
1870
  layer?: string | RegExp | ((args_0: string | undefined) => boolean) | undefined;
1871
1871
  chunks?: RegExp | "initial" | "async" | "all" | ((args_0: Chunk, ...args: unknown[]) => boolean) | undefined;
1872
1872
  name?: string | false | ((args_0: Module, args_1: Chunk[], args_2: string, ...args: unknown[]) => string | undefined) | undefined;
1873
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
1873
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
1874
1874
  usedExports?: boolean | undefined;
1875
1875
  defaultSizeTypes?: string[] | undefined;
1876
1876
  maxSize?: number | Record<string, number> | undefined;
@@ -2435,11 +2435,11 @@ export declare const rspackOptions: z.ZodObject<{
2435
2435
  }>], z.ZodUnknown>, z.ZodString>]>>;
2436
2436
  }, {
2437
2437
  emit: z.ZodOptional<z.ZodBoolean>;
2438
- filename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<JsAssetInfo, z.ZodTypeDef, JsAssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
2439
- publicPath: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<JsAssetInfo, z.ZodTypeDef, JsAssetInfo>>], z.ZodUnknown>, z.ZodString>]>]>>;
2438
+ filename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<AssetInfo, z.ZodTypeDef, AssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
2439
+ publicPath: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<AssetInfo, z.ZodTypeDef, AssetInfo>>], z.ZodUnknown>, z.ZodString>]>]>>;
2440
2440
  }>, "strict", z.ZodTypeAny, {
2441
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2442
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2441
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2442
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2443
2443
  dataUrl?: {
2444
2444
  encoding?: false | "base64" | undefined;
2445
2445
  mimetype?: string | undefined;
@@ -2449,8 +2449,8 @@ export declare const rspackOptions: z.ZodObject<{
2449
2449
  }, ...args: unknown[]) => string) | undefined;
2450
2450
  emit?: boolean | undefined;
2451
2451
  }, {
2452
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2453
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2452
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2453
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2454
2454
  dataUrl?: {
2455
2455
  encoding?: false | "base64" | undefined;
2456
2456
  mimetype?: string | undefined;
@@ -2499,15 +2499,15 @@ export declare const rspackOptions: z.ZodObject<{
2499
2499
  }>>;
2500
2500
  "asset/resource": z.ZodOptional<z.ZodObject<{
2501
2501
  emit: z.ZodOptional<z.ZodBoolean>;
2502
- filename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<JsAssetInfo, z.ZodTypeDef, JsAssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
2503
- publicPath: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<JsAssetInfo, z.ZodTypeDef, JsAssetInfo>>], z.ZodUnknown>, z.ZodString>]>]>>;
2502
+ filename: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<AssetInfo, z.ZodTypeDef, AssetInfo>>], z.ZodUnknown>, z.ZodString>]>>;
2503
+ publicPath: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PathData, z.ZodTypeDef, PathData>, z.ZodOptional<z.ZodType<AssetInfo, z.ZodTypeDef, AssetInfo>>], z.ZodUnknown>, z.ZodString>]>]>>;
2504
2504
  }, "strict", z.ZodTypeAny, {
2505
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2506
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2505
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2506
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2507
2507
  emit?: boolean | undefined;
2508
2508
  }, {
2509
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2510
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2509
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2510
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2511
2511
  emit?: boolean | undefined;
2512
2512
  }>>;
2513
2513
  css: z.ZodOptional<z.ZodObject<{
@@ -2558,8 +2558,8 @@ export declare const rspackOptions: z.ZodObject<{
2558
2558
  esModule?: boolean | undefined;
2559
2559
  } | undefined;
2560
2560
  asset?: {
2561
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2562
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2561
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2562
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2563
2563
  dataUrl?: {
2564
2564
  encoding?: false | "base64" | undefined;
2565
2565
  mimetype?: string | undefined;
@@ -2591,8 +2591,8 @@ export declare const rspackOptions: z.ZodObject<{
2591
2591
  }, ...args: unknown[]) => string) | undefined;
2592
2592
  } | undefined;
2593
2593
  "asset/resource"?: {
2594
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2595
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2594
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2595
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2596
2596
  emit?: boolean | undefined;
2597
2597
  } | undefined;
2598
2598
  }, {
@@ -2601,8 +2601,8 @@ export declare const rspackOptions: z.ZodObject<{
2601
2601
  esModule?: boolean | undefined;
2602
2602
  } | undefined;
2603
2603
  asset?: {
2604
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2605
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2604
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2605
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2606
2606
  dataUrl?: {
2607
2607
  encoding?: false | "base64" | undefined;
2608
2608
  mimetype?: string | undefined;
@@ -2634,8 +2634,8 @@ export declare const rspackOptions: z.ZodObject<{
2634
2634
  }, ...args: unknown[]) => string) | undefined;
2635
2635
  } | undefined;
2636
2636
  "asset/resource"?: {
2637
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2638
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2637
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2638
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2639
2639
  emit?: boolean | undefined;
2640
2640
  } | undefined;
2641
2641
  }>, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>]>>;
@@ -2749,8 +2749,8 @@ export declare const rspackOptions: z.ZodObject<{
2749
2749
  esModule?: boolean | undefined;
2750
2750
  } | undefined;
2751
2751
  asset?: {
2752
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2753
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2752
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2753
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2754
2754
  dataUrl?: {
2755
2755
  encoding?: false | "base64" | undefined;
2756
2756
  mimetype?: string | undefined;
@@ -2782,8 +2782,8 @@ export declare const rspackOptions: z.ZodObject<{
2782
2782
  }, ...args: unknown[]) => string) | undefined;
2783
2783
  } | undefined;
2784
2784
  "asset/resource"?: {
2785
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2786
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2785
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2786
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2787
2787
  emit?: boolean | undefined;
2788
2788
  } | undefined;
2789
2789
  } | undefined;
@@ -2897,8 +2897,8 @@ export declare const rspackOptions: z.ZodObject<{
2897
2897
  esModule?: boolean | undefined;
2898
2898
  } | undefined;
2899
2899
  asset?: {
2900
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2901
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2900
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2901
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2902
2902
  dataUrl?: {
2903
2903
  encoding?: false | "base64" | undefined;
2904
2904
  mimetype?: string | undefined;
@@ -2930,8 +2930,8 @@ export declare const rspackOptions: z.ZodObject<{
2930
2930
  }, ...args: unknown[]) => string) | undefined;
2931
2931
  } | undefined;
2932
2932
  "asset/resource"?: {
2933
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2934
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2933
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2934
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
2935
2935
  emit?: boolean | undefined;
2936
2936
  } | undefined;
2937
2937
  } | undefined;
@@ -3069,8 +3069,8 @@ export declare const rspackOptions: z.ZodObject<{
3069
3069
  esModule?: boolean | undefined;
3070
3070
  } | undefined;
3071
3071
  asset?: {
3072
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3073
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3072
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3073
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3074
3074
  dataUrl?: {
3075
3075
  encoding?: false | "base64" | undefined;
3076
3076
  mimetype?: string | undefined;
@@ -3102,8 +3102,8 @@ export declare const rspackOptions: z.ZodObject<{
3102
3102
  }, ...args: unknown[]) => string) | undefined;
3103
3103
  } | undefined;
3104
3104
  "asset/resource"?: {
3105
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3106
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3105
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3106
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3107
3107
  emit?: boolean | undefined;
3108
3108
  } | undefined;
3109
3109
  } | undefined;
@@ -3282,9 +3282,9 @@ export declare const rspackOptions: z.ZodObject<{
3282
3282
  runtime?: string | false | undefined;
3283
3283
  chunkLoading?: string | false | undefined;
3284
3284
  asyncChunks?: boolean | undefined;
3285
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3285
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3286
3286
  baseUri?: string | undefined;
3287
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3287
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3288
3288
  library?: {
3289
3289
  type: string;
3290
3290
  name?: string | string[] | {
@@ -3310,9 +3310,9 @@ export declare const rspackOptions: z.ZodObject<{
3310
3310
  runtime?: string | false | undefined;
3311
3311
  chunkLoading?: string | false | undefined;
3312
3312
  asyncChunks?: boolean | undefined;
3313
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3313
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3314
3314
  baseUri?: string | undefined;
3315
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3315
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3316
3316
  library?: {
3317
3317
  type: string;
3318
3318
  name?: string | string[] | {
@@ -3338,9 +3338,9 @@ export declare const rspackOptions: z.ZodObject<{
3338
3338
  runtime?: string | false | undefined;
3339
3339
  chunkLoading?: string | false | undefined;
3340
3340
  asyncChunks?: boolean | undefined;
3341
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3341
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3342
3342
  baseUri?: string | undefined;
3343
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3343
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3344
3344
  library?: {
3345
3345
  type: string;
3346
3346
  name?: string | string[] | {
@@ -3366,8 +3366,8 @@ export declare const rspackOptions: z.ZodObject<{
3366
3366
  path?: string | undefined;
3367
3367
  chunkLoading?: string | false | undefined;
3368
3368
  asyncChunks?: boolean | undefined;
3369
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3370
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3369
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3370
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3371
3371
  library?: string | string[] | {
3372
3372
  commonjs?: string | undefined;
3373
3373
  amd?: string | undefined;
@@ -3402,14 +3402,14 @@ export declare const rspackOptions: z.ZodObject<{
3402
3402
  clean?: boolean | {
3403
3403
  keep?: string | undefined;
3404
3404
  } | undefined;
3405
- chunkFilename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3405
+ chunkFilename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3406
3406
  crossOriginLoading?: false | "anonymous" | "use-credentials" | undefined;
3407
- cssFilename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3408
- cssChunkFilename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3407
+ cssFilename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3408
+ cssChunkFilename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3409
3409
  hotUpdateMainFilename?: string | undefined;
3410
3410
  hotUpdateChunkFilename?: string | undefined;
3411
3411
  hotUpdateGlobal?: string | undefined;
3412
- assetModuleFilename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3412
+ assetModuleFilename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3413
3413
  uniqueName?: string | undefined;
3414
3414
  chunkLoadingGlobal?: string | undefined;
3415
3415
  enabledLibraryTypes?: string[] | undefined;
@@ -3494,7 +3494,7 @@ export declare const rspackOptions: z.ZodObject<{
3494
3494
  splitChunks?: false | {
3495
3495
  chunks?: RegExp | "initial" | "async" | "all" | ((args_0: Chunk, ...args: unknown[]) => boolean) | undefined;
3496
3496
  name?: string | false | ((args_0: Module, args_1: Chunk[], args_2: string, ...args: unknown[]) => string | undefined) | undefined;
3497
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3497
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3498
3498
  usedExports?: boolean | undefined;
3499
3499
  defaultSizeTypes?: string[] | undefined;
3500
3500
  cacheGroups?: Record<string, false | {
@@ -3502,7 +3502,7 @@ export declare const rspackOptions: z.ZodObject<{
3502
3502
  layer?: string | RegExp | ((args_0: string | undefined) => boolean) | undefined;
3503
3503
  chunks?: RegExp | "initial" | "async" | "all" | ((args_0: Chunk, ...args: unknown[]) => boolean) | undefined;
3504
3504
  name?: string | false | ((args_0: Module, args_1: Chunk[], args_2: string, ...args: unknown[]) => string | undefined) | undefined;
3505
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3505
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3506
3506
  usedExports?: boolean | undefined;
3507
3507
  defaultSizeTypes?: string[] | undefined;
3508
3508
  maxSize?: number | Record<string, number> | undefined;
@@ -3680,8 +3680,8 @@ export declare const rspackOptions: z.ZodObject<{
3680
3680
  esModule?: boolean | undefined;
3681
3681
  } | undefined;
3682
3682
  asset?: {
3683
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3684
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3683
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3684
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3685
3685
  dataUrl?: {
3686
3686
  encoding?: false | "base64" | undefined;
3687
3687
  mimetype?: string | undefined;
@@ -3713,8 +3713,8 @@ export declare const rspackOptions: z.ZodObject<{
3713
3713
  }, ...args: unknown[]) => string) | undefined;
3714
3714
  } | undefined;
3715
3715
  "asset/resource"?: {
3716
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3717
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3716
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3717
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3718
3718
  emit?: boolean | undefined;
3719
3719
  } | undefined;
3720
3720
  } | undefined;
@@ -3893,9 +3893,9 @@ export declare const rspackOptions: z.ZodObject<{
3893
3893
  runtime?: string | false | undefined;
3894
3894
  chunkLoading?: string | false | undefined;
3895
3895
  asyncChunks?: boolean | undefined;
3896
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3896
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3897
3897
  baseUri?: string | undefined;
3898
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3898
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3899
3899
  library?: {
3900
3900
  type: string;
3901
3901
  name?: string | string[] | {
@@ -3921,9 +3921,9 @@ export declare const rspackOptions: z.ZodObject<{
3921
3921
  runtime?: string | false | undefined;
3922
3922
  chunkLoading?: string | false | undefined;
3923
3923
  asyncChunks?: boolean | undefined;
3924
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3924
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3925
3925
  baseUri?: string | undefined;
3926
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3926
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3927
3927
  library?: {
3928
3928
  type: string;
3929
3929
  name?: string | string[] | {
@@ -3949,9 +3949,9 @@ export declare const rspackOptions: z.ZodObject<{
3949
3949
  runtime?: string | false | undefined;
3950
3950
  chunkLoading?: string | false | undefined;
3951
3951
  asyncChunks?: boolean | undefined;
3952
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3952
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3953
3953
  baseUri?: string | undefined;
3954
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3954
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3955
3955
  library?: {
3956
3956
  type: string;
3957
3957
  name?: string | string[] | {
@@ -3977,8 +3977,8 @@ export declare const rspackOptions: z.ZodObject<{
3977
3977
  path?: string | undefined;
3978
3978
  chunkLoading?: string | false | undefined;
3979
3979
  asyncChunks?: boolean | undefined;
3980
- publicPath?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3981
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3980
+ publicPath?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3981
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
3982
3982
  library?: string | string[] | {
3983
3983
  commonjs?: string | undefined;
3984
3984
  amd?: string | undefined;
@@ -4013,14 +4013,14 @@ export declare const rspackOptions: z.ZodObject<{
4013
4013
  clean?: boolean | {
4014
4014
  keep?: string | undefined;
4015
4015
  } | undefined;
4016
- chunkFilename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
4016
+ chunkFilename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
4017
4017
  crossOriginLoading?: false | "anonymous" | "use-credentials" | undefined;
4018
- cssFilename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
4019
- cssChunkFilename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
4018
+ cssFilename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
4019
+ cssChunkFilename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
4020
4020
  hotUpdateMainFilename?: string | undefined;
4021
4021
  hotUpdateChunkFilename?: string | undefined;
4022
4022
  hotUpdateGlobal?: string | undefined;
4023
- assetModuleFilename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
4023
+ assetModuleFilename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
4024
4024
  uniqueName?: string | undefined;
4025
4025
  chunkLoadingGlobal?: string | undefined;
4026
4026
  enabledLibraryTypes?: string[] | undefined;
@@ -4105,7 +4105,7 @@ export declare const rspackOptions: z.ZodObject<{
4105
4105
  splitChunks?: false | {
4106
4106
  chunks?: RegExp | "initial" | "async" | "all" | ((args_0: Chunk, ...args: unknown[]) => boolean) | undefined;
4107
4107
  name?: string | false | ((args_0: Module, args_1: Chunk[], args_2: string, ...args: unknown[]) => string | undefined) | undefined;
4108
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
4108
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
4109
4109
  usedExports?: boolean | undefined;
4110
4110
  defaultSizeTypes?: string[] | undefined;
4111
4111
  cacheGroups?: Record<string, false | {
@@ -4113,7 +4113,7 @@ export declare const rspackOptions: z.ZodObject<{
4113
4113
  layer?: string | RegExp | ((args_0: string | undefined) => boolean) | undefined;
4114
4114
  chunks?: RegExp | "initial" | "async" | "all" | ((args_0: Chunk, ...args: unknown[]) => boolean) | undefined;
4115
4115
  name?: string | false | ((args_0: Module, args_1: Chunk[], args_2: string, ...args: unknown[]) => string | undefined) | undefined;
4116
- filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined;
4116
+ filename?: string | ((args_0: PathData, args_1: AssetInfo | undefined, ...args: unknown[]) => string) | undefined;
4117
4117
  usedExports?: boolean | undefined;
4118
4118
  defaultSizeTypes?: string[] | undefined;
4119
4119
  maxSize?: number | Record<string, number> | undefined;
package/dist/index.js CHANGED
@@ -894,72 +894,6 @@ var DependenciesBlock = class _DependenciesBlock {
894
894
  }
895
895
  };
896
896
 
897
- // src/util/AssetInfo.ts
898
- var JsAssetInfo = class {
899
- static __from_binding(jsAssetInfo) {
900
- const {
901
- immutable,
902
- minimized,
903
- development,
904
- hotModuleReplacement,
905
- related,
906
- chunkhash,
907
- fullhash,
908
- contenthash,
909
- javascriptModule,
910
- sourceFilename,
911
- copied,
912
- extras
913
- } = jsAssetInfo;
914
- return {
915
- ...extras,
916
- // extras should not overwrite any KnownAssetFields
917
- immutable,
918
- minimized,
919
- development,
920
- hotModuleReplacement,
921
- related,
922
- fullhash,
923
- chunkhash,
924
- contenthash,
925
- javascriptModule,
926
- sourceFilename,
927
- copied
928
- };
929
- }
930
- static __to_binding(assetInfo = {}) {
931
- let {
932
- immutable = false,
933
- minimized = false,
934
- development = false,
935
- hotModuleReplacement = false,
936
- related = {},
937
- fullhash = [],
938
- chunkhash = [],
939
- contenthash = [],
940
- javascriptModule,
941
- sourceFilename,
942
- copied,
943
- ...extras
944
- } = assetInfo;
945
- extras = extras ?? {};
946
- return {
947
- immutable,
948
- minimized,
949
- development,
950
- hotModuleReplacement,
951
- related,
952
- fullhash,
953
- chunkhash,
954
- contenthash,
955
- extras,
956
- javascriptModule,
957
- sourceFilename,
958
- copied
959
- };
960
- }
961
- };
962
-
963
897
  // src/util/source.ts
964
898
  var import_webpack_sources = require("../compiled/webpack-sources/index.js");
965
899
  var JsSource = class extends import_webpack_sources.Source {
@@ -1260,7 +1194,7 @@ var Module = class _Module {
1260
1194
  return this.#inner.emitFile(
1261
1195
  filename2,
1262
1196
  JsSource.__to_binding(source),
1263
- JsAssetInfo.__to_binding(assetInfo)
1197
+ assetInfo
1264
1198
  );
1265
1199
  }
1266
1200
  };
@@ -3231,7 +3165,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
3231
3165
  __privateGet(this, _inner).updateAsset(
3232
3166
  filename2,
3233
3167
  compatNewSourceOrFunction,
3234
- assetInfoUpdateOrFunction === void 0 ? assetInfoUpdateOrFunction : typeof assetInfoUpdateOrFunction === "function" ? (jsAssetInfo) => JsAssetInfo.__to_binding(assetInfoUpdateOrFunction(jsAssetInfo)) : JsAssetInfo.__to_binding(assetInfoUpdateOrFunction)
3168
+ assetInfoUpdateOrFunction === void 0 ? assetInfoUpdateOrFunction : typeof assetInfoUpdateOrFunction === "function" ? (assetInfo) => assetInfoUpdateOrFunction(assetInfo) : assetInfoUpdateOrFunction
3235
3169
  );
3236
3170
  }
3237
3171
  /**
@@ -3242,11 +3176,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
3242
3176
  * @param assetInfo - extra asset information
3243
3177
  */
3244
3178
  emitAsset(filename2, source, assetInfo) {
3245
- __privateGet(this, _inner).emitAsset(
3246
- filename2,
3247
- JsSource.__to_binding(source),
3248
- JsAssetInfo.__to_binding(assetInfo)
3249
- );
3179
+ __privateGet(this, _inner).emitAsset(filename2, JsSource.__to_binding(source), assetInfo);
3250
3180
  }
3251
3181
  deleteAsset(filename2) {
3252
3182
  __privateGet(this, _inner).deleteAsset(filename2);
@@ -3262,7 +3192,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
3262
3192
  return assets.map((asset) => {
3263
3193
  return Object.defineProperties(asset, {
3264
3194
  info: {
3265
- value: JsAssetInfo.__from_binding(asset.info)
3195
+ value: asset.info
3266
3196
  },
3267
3197
  source: {
3268
3198
  get: () => this.__internal__getAssetSource(asset.name)
@@ -3277,7 +3207,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
3277
3207
  }
3278
3208
  return Object.defineProperties(asset, {
3279
3209
  info: {
3280
- value: JsAssetInfo.__from_binding(asset.info)
3210
+ value: asset.info
3281
3211
  },
3282
3212
  source: {
3283
3213
  get: () => this.__internal__getAssetSource(asset.name)
@@ -15241,6 +15171,11 @@ var Compiler = class _Compiler {
15241
15171
  const isRoot = this.root === this;
15242
15172
  return !isRoot;
15243
15173
  }
15174
+ /**
15175
+ * Create a compilation and run it, which is the basic method that `compiler.run` and `compiler.watch` depend on.
15176
+ * TODO: make this method private in the next major release
15177
+ * @private this method is only used in Rspack core
15178
+ */
15244
15179
  compile(callback) {
15245
15180
  const startTime = Date.now();
15246
15181
  const params = this.#newCompilationParams();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/core",
3
- "version": "1.2.6",
3
+ "version": "1.2.7-alpha.0",
4
4
  "webpackVersion": "5.75.0",
5
5
  "license": "MIT",
6
6
  "description": "The fast Rust-based web bundler with webpack-compatible API",
@@ -48,7 +48,7 @@
48
48
  "graceful-fs": "^4.2.11",
49
49
  "json-parse-even-better-errors": "^3.0.2",
50
50
  "prebundle": "^1.2.7",
51
- "tsc-alias": "^1.8.10",
51
+ "tsc-alias": "^1.8.11",
52
52
  "tsup": "^8.3.6",
53
53
  "tsx": "^4.19.3",
54
54
  "typescript": "^5.7.3",
@@ -57,13 +57,13 @@
57
57
  "webpack-sources": "3.2.3",
58
58
  "zod": "^3.24.2",
59
59
  "zod-validation-error": "3.4.0",
60
- "@rspack/tracing": "1.2.6"
60
+ "@rspack/tracing": "1.2.7-alpha.0"
61
61
  },
62
62
  "dependencies": {
63
63
  "@module-federation/runtime-tools": "0.8.4",
64
64
  "@rspack/lite-tapable": "1.0.1",
65
65
  "caniuse-lite": "^1.0.30001700",
66
- "@rspack/binding": "1.2.6"
66
+ "@rspack/binding": "1.2.7-alpha.0"
67
67
  },
68
68
  "peerDependencies": {
69
69
  "@rspack/tracing": "^1.x",
@@ -1,7 +0,0 @@
1
- import type { JsAssetInfo as JsAssetInfoBinding } from "@rspack/binding";
2
- export type AssetInfo = Partial<Omit<JsAssetInfoBinding, "extras">> & Record<string, any>;
3
- declare class JsAssetInfo {
4
- static __from_binding(jsAssetInfo: JsAssetInfoBinding): AssetInfo;
5
- static __to_binding(assetInfo?: AssetInfo): JsAssetInfoBinding;
6
- }
7
- export { JsAssetInfo };