@rspack-canary/browser 1.6.0-canary-cf832f72-20251028084837 → 1.6.0-canary-bf68c45d-20251028142310

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.
@@ -226,8 +226,32 @@ export type HashSalt = string;
226
226
  export type SourceMapFilename = string;
227
227
  /** This option determines the module's namespace */
228
228
  export type DevtoolNamespace = string;
229
+ export interface ModuleFilenameTemplateContext {
230
+ /** The identifier of the module */
231
+ identifier: string;
232
+ /** The shortened identifier of the module */
233
+ shortIdentifier: string;
234
+ /** The resource of the module request */
235
+ resource: string;
236
+ /** The resource path of the module request */
237
+ resourcePath: string;
238
+ /** The absolute resource path of the module request */
239
+ absoluteResourcePath: string;
240
+ /** The loaders of the module request */
241
+ loaders: string;
242
+ /** All loaders of the module request */
243
+ allLoaders: string;
244
+ /** The query of the module identifier */
245
+ query: string;
246
+ /** The module id of the module */
247
+ moduleId: string;
248
+ /** The hash of the module identifier */
249
+ hash: string;
250
+ /** The module namespace */
251
+ namespace: string;
252
+ }
229
253
  /** This option is only used when devtool uses an option that requires module names. */
230
- export type DevtoolModuleFilenameTemplate = string | ((info: any) => any);
254
+ export type DevtoolModuleFilenameTemplate = string | ((context: ModuleFilenameTemplateContext) => string);
231
255
  /** A fallback is used when the template string or function above yields duplicates. */
232
256
  export type DevtoolFallbackModuleFilenameTemplate = DevtoolModuleFilenameTemplate;
233
257
  /** Tell Rspack what kind of ES-features may be used in the generated runtime-code. */