@rspack/core 0.5.9-canary-4297cec-20240402080759 → 0.5.9-canary-5be4c34-20240403005129

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.
@@ -98,6 +98,7 @@ const filename = filenameTemplate.or(zod_1.z
98
98
  const entryFilename = filenameTemplate;
99
99
  const entryRuntime = zod_1.z.literal(false).or(zod_1.z.string());
100
100
  const entryItem = zod_1.z.string().or(zod_1.z.array(zod_1.z.string()));
101
+ const entryDependOn = zod_1.z.string().or(zod_1.z.array(zod_1.z.string()));
101
102
  const entryDescription = zod_1.z.strictObject({
102
103
  import: entryItem,
103
104
  runtime: entryRuntime.optional(),
@@ -107,7 +108,8 @@ const entryDescription = zod_1.z.strictObject({
107
108
  asyncChunks: asyncChunks.optional(),
108
109
  wasmLoading: wasmLoading.optional(),
109
110
  filename: entryFilename.optional(),
110
- library: libraryOptions.optional()
111
+ library: libraryOptions.optional(),
112
+ dependOn: entryDependOn.optional()
111
113
  });
112
114
  const entryUnnamed = entryItem;
113
115
  const entryObject = zod_1.z.record(entryItem.or(entryDescription));
@@ -311,6 +313,16 @@ const assetParserDataUrl = assetParserDataUrlOptions;
311
313
  const assetParserOptions = zod_1.z.strictObject({
312
314
  dataUrlCondition: assetParserDataUrl.optional()
313
315
  });
316
+ const cssParserNamedExports = zod_1.z.boolean();
317
+ const cssParserOptions = zod_1.z.strictObject({
318
+ namedExports: cssParserNamedExports.optional()
319
+ });
320
+ const cssAutoParserOptions = zod_1.z.strictObject({
321
+ namedExports: cssParserNamedExports.optional()
322
+ });
323
+ const cssModuleParserOptions = zod_1.z.strictObject({
324
+ namedExports: cssParserNamedExports.optional()
325
+ });
314
326
  //TODO: "weak", "lazy-once"
315
327
  const dynamicImportMode = zod_1.z.enum(["eager", "lazy"]);
316
328
  const dynamicImportPreload = zod_1.z.union([zod_1.z.boolean(), zod_1.z.number()]);
@@ -324,6 +336,9 @@ const javascriptParserOptions = zod_1.z.strictObject({
324
336
  });
325
337
  const parserOptionsByModuleTypeKnown = zod_1.z.strictObject({
326
338
  asset: assetParserOptions.optional(),
339
+ css: cssParserOptions.optional(),
340
+ "css/auto": cssAutoParserOptions.optional(),
341
+ "css/module": cssModuleParserOptions.optional(),
327
342
  javascript: javascriptParserOptions.optional()
328
343
  });
329
344
  const parserOptionsByModuleTypeUnknown = zod_1.z.record(zod_1.z.record(zod_1.z.any()));
@@ -348,10 +363,36 @@ const assetResourceGeneratorOptions = zod_1.z.strictObject({
348
363
  publicPath: publicPath.optional()
349
364
  });
350
365
  const assetGeneratorOptions = assetInlineGeneratorOptions.merge(assetResourceGeneratorOptions);
366
+ const cssGeneratorExportsConvention = zod_1.z.enum([
367
+ "as-is",
368
+ "camel-case",
369
+ "camel-case-only",
370
+ "dashes",
371
+ "dashes-only"
372
+ ]);
373
+ const cssGeneratorExportsOnly = zod_1.z.boolean();
374
+ const cssGeneratorLocalIdentName = zod_1.z.string();
375
+ const cssGeneratorOptions = zod_1.z.strictObject({
376
+ exportsConvention: cssGeneratorExportsConvention.optional(),
377
+ exportsOnly: cssGeneratorExportsOnly.optional()
378
+ });
379
+ const cssAutoGeneratorOptions = zod_1.z.strictObject({
380
+ exportsConvention: cssGeneratorExportsConvention.optional(),
381
+ exportsOnly: cssGeneratorExportsOnly.optional(),
382
+ localIdentName: cssGeneratorLocalIdentName.optional()
383
+ });
384
+ const cssModuleGeneratorOptions = zod_1.z.strictObject({
385
+ exportsConvention: cssGeneratorExportsConvention.optional(),
386
+ exportsOnly: cssGeneratorExportsOnly.optional(),
387
+ localIdentName: cssGeneratorLocalIdentName.optional()
388
+ });
351
389
  const generatorOptionsByModuleTypeKnown = zod_1.z.strictObject({
352
390
  asset: assetGeneratorOptions.optional(),
353
391
  "asset/inline": assetInlineGeneratorOptions.optional(),
354
- "asset/resource": assetResourceGeneratorOptions.optional()
392
+ "asset/resource": assetResourceGeneratorOptions.optional(),
393
+ css: cssGeneratorOptions.optional(),
394
+ "css/auto": cssAutoGeneratorOptions.optional(),
395
+ "css/module": cssModuleGeneratorOptions.optional()
355
396
  });
356
397
  const generatorOptionsByModuleTypeUnknown = zod_1.z.record(zod_1.z.record(zod_1.z.any()));
357
398
  const generatorOptionsByModuleType = generatorOptionsByModuleTypeKnown.or(generatorOptionsByModuleTypeUnknown);
@@ -21,7 +21,7 @@ export type RemotesConfig = {
21
21
  export declare class ContainerReferencePlugin extends RspackBuiltinPlugin {
22
22
  name: BuiltinPluginName;
23
23
  _options: {
24
- remoteType: "promise" | "module" | "jsonp" | "import" | "amd" | "commonjs" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "system" | "script" | "node-commonjs";
24
+ remoteType: "module" | "promise" | "script" | "commonjs" | "jsonp" | "import" | "amd" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "system" | "node-commonjs";
25
25
  remotes: [string, {
26
26
  external: string[];
27
27
  shareScope: string;
package/dist/exports.d.ts CHANGED
@@ -51,6 +51,7 @@ export declare const config: {
51
51
  } | undefined;
52
52
  umdNamedDefine?: boolean | undefined;
53
53
  } | undefined;
54
+ dependOn?: string | string[] | undefined;
54
55
  }> | ((...args: unknown[]) => string | string[] | Record<string, string | string[] | {
55
56
  import: (string | string[]) & (string | string[] | undefined);
56
57
  runtime?: string | false | undefined;
@@ -77,6 +78,7 @@ export declare const config: {
77
78
  } | undefined;
78
79
  umdNamedDefine?: boolean | undefined;
79
80
  } | undefined;
81
+ dependOn?: string | string[] | undefined;
80
82
  }>) | undefined;
81
83
  output?: {
82
84
  path?: string | undefined;
@@ -154,8 +156,8 @@ export declare const config: {
154
156
  devtoolModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
155
157
  devtoolFallbackModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
156
158
  } | undefined;
157
- target?: false | "async-node" | "node" | "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "browserslist" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | "electron-main" | `electron${number}-main` | `electron${number}.${number}-main` | "electron-renderer" | `electron${number}-renderer` | `electron${number}.${number}-renderer` | "electron-preload" | `electron${number}-preload` | `electron${number}.${number}-preload` | ("async-node" | "node" | "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "browserslist" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | "electron-main" | `electron${number}-main` | `electron${number}.${number}-main` | "electron-renderer" | `electron${number}-renderer` | `electron${number}.${number}-renderer` | "electron-preload" | `electron${number}-preload` | `electron${number}.${number}-preload`)[] | undefined;
158
- mode?: "none" | "development" | "production" | undefined;
159
+ target?: false | "node" | "async-node" | "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "browserslist" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | "electron-main" | `electron${number}-main` | `electron${number}.${number}-main` | "electron-renderer" | `electron${number}-renderer` | `electron${number}.${number}-renderer` | "electron-preload" | `electron${number}-preload` | `electron${number}.${number}-preload` | ("node" | "async-node" | "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "browserslist" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | "electron-main" | `electron${number}-main` | `electron${number}.${number}-main` | "electron-renderer" | `electron${number}-renderer` | `electron${number}.${number}-renderer` | "electron-preload" | `electron${number}-preload` | `electron${number}.${number}-preload`)[] | undefined;
160
+ mode?: "production" | "development" | "none" | undefined;
159
161
  experiments?: {
160
162
  lazyCompilation?: boolean | undefined;
161
163
  asyncWebAssembly?: boolean | undefined;
@@ -177,7 +179,7 @@ export declare const config: {
177
179
  context?: string | undefined;
178
180
  dependencyType?: string | undefined;
179
181
  request?: string | undefined;
180
- }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "promise" | "module" | "jsonp" | "import" | "amd" | "commonjs" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "system" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
182
+ }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "promise" | "script" | "commonjs" | "jsonp" | "import" | "amd" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "system" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
181
183
  context?: string | undefined;
182
184
  dependencyType?: string | undefined;
183
185
  request?: string | undefined;
@@ -185,12 +187,12 @@ export declare const config: {
185
187
  context?: string | undefined;
186
188
  dependencyType?: string | undefined;
187
189
  request?: string | undefined;
188
- }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "promise" | "module" | "jsonp" | "import" | "amd" | "commonjs" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "system" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
190
+ }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "promise" | "script" | "commonjs" | "jsonp" | "import" | "amd" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "system" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
189
191
  context?: string | undefined;
190
192
  dependencyType?: string | undefined;
191
193
  request?: string | undefined;
192
194
  }, ...args_1: unknown[]) => Promise<string | boolean | string[] | Record<string, string | string[]>>))[] | undefined;
193
- externalsType?: "promise" | "module" | "jsonp" | "import" | "amd" | "commonjs" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "system" | "script" | "node-commonjs" | undefined;
195
+ externalsType?: "module" | "promise" | "script" | "commonjs" | "jsonp" | "import" | "amd" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "system" | "node-commonjs" | undefined;
194
196
  externalsPresets?: {
195
197
  node?: boolean | undefined;
196
198
  web?: boolean | undefined;
@@ -225,9 +227,9 @@ export declare const config: {
225
227
  stdin?: boolean | undefined;
226
228
  } | undefined;
227
229
  watch?: boolean | undefined;
228
- stats?: boolean | "normal" | "none" | "verbose" | "errors-only" | "errors-warnings" | {
230
+ stats?: boolean | "none" | "normal" | "verbose" | "errors-only" | "errors-warnings" | {
229
231
  all?: boolean | undefined;
230
- preset?: "normal" | "none" | "verbose" | "errors-only" | "errors-warnings" | undefined;
232
+ preset?: "none" | "normal" | "verbose" | "errors-only" | "errors-warnings" | undefined;
231
233
  assets?: boolean | undefined;
232
234
  chunks?: boolean | undefined;
233
235
  modules?: boolean | undefined;
@@ -278,7 +280,7 @@ export declare const config: {
278
280
  minimizer?: (false | "" | 0 | import("./config").RspackPluginInstance | "..." | import("./config").RspackPluginFunction | null | undefined)[] | undefined;
279
281
  mergeDuplicateChunks?: boolean | undefined;
280
282
  splitChunks?: false | {
281
- chunks?: RegExp | "async" | "all" | "initial" | ((args_0: import("./Chunk").Chunk, ...args_1: unknown[]) => boolean) | undefined;
283
+ chunks?: RegExp | "async" | "initial" | "all" | ((args_0: import("./Chunk").Chunk, ...args_1: unknown[]) => boolean) | undefined;
282
284
  minChunks?: number | undefined;
283
285
  name?: string | false | ((args_0: import("./Module").Module | undefined, ...args_1: unknown[]) => unknown) | undefined;
284
286
  minSize?: number | undefined;
@@ -287,7 +289,7 @@ export declare const config: {
287
289
  maxInitialSize?: number | undefined;
288
290
  automaticNameDelimiter?: string | undefined;
289
291
  cacheGroups?: Record<string, false | {
290
- chunks?: RegExp | "async" | "all" | "initial" | ((args_0: import("./Chunk").Chunk, ...args_1: unknown[]) => boolean) | undefined;
292
+ chunks?: RegExp | "async" | "initial" | "all" | ((args_0: import("./Chunk").Chunk, ...args_1: unknown[]) => boolean) | undefined;
291
293
  minChunks?: number | undefined;
292
294
  name?: string | false | ((args_0: import("./Module").Module | undefined, ...args_1: unknown[]) => unknown) | undefined;
293
295
  minSize?: number | undefined;
@@ -306,7 +308,7 @@ export declare const config: {
306
308
  maxAsyncRequests?: number | undefined;
307
309
  maxInitialRequests?: number | undefined;
308
310
  fallbackCacheGroup?: {
309
- chunks?: RegExp | "async" | "all" | "initial" | ((args_0: import("./Chunk").Chunk, ...args_1: unknown[]) => boolean) | undefined;
311
+ chunks?: RegExp | "async" | "initial" | "all" | ((args_0: import("./Chunk").Chunk, ...args_1: unknown[]) => boolean) | undefined;
310
312
  minSize?: number | undefined;
311
313
  maxSize?: number | undefined;
312
314
  maxAsyncSize?: number | undefined;
@@ -315,7 +317,7 @@ export declare const config: {
315
317
  } | undefined;
316
318
  hidePathInfo?: boolean | undefined;
317
319
  } | undefined;
318
- runtimeChunk?: boolean | "single" | "multiple" | {
320
+ runtimeChunk?: boolean | "multiple" | "single" | {
319
321
  name?: string | ((...args: unknown[]) => string | undefined) | undefined;
320
322
  } | undefined;
321
323
  removeAvailableModules?: boolean | undefined;
@@ -343,6 +345,15 @@ export declare const config: {
343
345
  maxSize?: number | undefined;
344
346
  } | undefined;
345
347
  } | undefined;
348
+ css?: {
349
+ namedExports?: boolean | undefined;
350
+ } | undefined;
351
+ "css/auto"?: {
352
+ namedExports?: boolean | undefined;
353
+ } | undefined;
354
+ "css/module"?: {
355
+ namedExports?: boolean | undefined;
356
+ } | undefined;
346
357
  javascript?: {
347
358
  dynamicImportMode?: "eager" | "lazy" | undefined;
348
359
  dynamicImportPreload?: number | boolean | undefined;
@@ -375,6 +386,20 @@ export declare const config: {
375
386
  filename?: string | undefined;
376
387
  publicPath?: string | undefined;
377
388
  } | undefined;
389
+ css?: {
390
+ exportsConvention?: "as-is" | "camel-case" | "camel-case-only" | "dashes" | "dashes-only" | undefined;
391
+ exportsOnly?: boolean | undefined;
392
+ } | undefined;
393
+ "css/auto"?: {
394
+ exportsConvention?: "as-is" | "camel-case" | "camel-case-only" | "dashes" | "dashes-only" | undefined;
395
+ exportsOnly?: boolean | undefined;
396
+ localIdentName?: string | undefined;
397
+ } | undefined;
398
+ "css/module"?: {
399
+ exportsConvention?: "as-is" | "camel-case" | "camel-case-only" | "dashes" | "dashes-only" | undefined;
400
+ exportsOnly?: boolean | undefined;
401
+ localIdentName?: string | undefined;
402
+ } | undefined;
378
403
  } | undefined;
379
404
  noParse?: string | RegExp | ((args_0: string, ...args_1: unknown[]) => boolean) | (string | RegExp | ((args_0: string, ...args_1: unknown[]) => boolean))[] | undefined;
380
405
  } | undefined;
@@ -411,6 +436,7 @@ export declare const config: {
411
436
  } | undefined;
412
437
  umdNamedDefine?: boolean | undefined;
413
438
  } | undefined;
439
+ dependOn?: string | string[] | undefined;
414
440
  }> | ((...args: unknown[]) => string | string[] | Record<string, string | string[] | {
415
441
  import: (string | string[]) & (string | string[] | undefined);
416
442
  runtime?: string | false | undefined;
@@ -437,6 +463,7 @@ export declare const config: {
437
463
  } | undefined;
438
464
  umdNamedDefine?: boolean | undefined;
439
465
  } | undefined;
466
+ dependOn?: string | string[] | undefined;
440
467
  }>) | undefined;
441
468
  output?: {
442
469
  path?: string | undefined;
@@ -514,8 +541,8 @@ export declare const config: {
514
541
  devtoolModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
515
542
  devtoolFallbackModuleFilenameTemplate?: string | ((args_0: any) => any) | undefined;
516
543
  } | undefined;
517
- target?: false | "async-node" | "node" | "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "browserslist" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | "electron-main" | `electron${number}-main` | `electron${number}.${number}-main` | "electron-renderer" | `electron${number}-renderer` | `electron${number}.${number}-renderer` | "electron-preload" | `electron${number}-preload` | `electron${number}.${number}-preload` | ("async-node" | "node" | "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "browserslist" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | "electron-main" | `electron${number}-main` | `electron${number}.${number}-main` | "electron-renderer" | `electron${number}-renderer` | `electron${number}.${number}-renderer` | "electron-preload" | `electron${number}-preload` | `electron${number}.${number}-preload`)[] | undefined;
518
- mode?: "none" | "development" | "production" | undefined;
544
+ target?: false | "node" | "async-node" | "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "browserslist" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | "electron-main" | `electron${number}-main` | `electron${number}.${number}-main` | "electron-renderer" | `electron${number}-renderer` | `electron${number}.${number}-renderer` | "electron-preload" | `electron${number}-preload` | `electron${number}.${number}-preload` | ("node" | "async-node" | "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "browserslist" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | "electron-main" | `electron${number}-main` | `electron${number}.${number}-main` | "electron-renderer" | `electron${number}-renderer` | `electron${number}.${number}-renderer` | "electron-preload" | `electron${number}-preload` | `electron${number}.${number}-preload`)[] | undefined;
545
+ mode?: "production" | "development" | "none" | undefined;
519
546
  experiments?: {
520
547
  lazyCompilation?: boolean | undefined;
521
548
  asyncWebAssembly?: boolean | undefined;
@@ -537,7 +564,7 @@ export declare const config: {
537
564
  context?: string | undefined;
538
565
  dependencyType?: string | undefined;
539
566
  request?: string | undefined;
540
- }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "promise" | "module" | "jsonp" | "import" | "amd" | "commonjs" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "system" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
567
+ }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "promise" | "script" | "commonjs" | "jsonp" | "import" | "amd" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "system" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
541
568
  context?: string | undefined;
542
569
  dependencyType?: string | undefined;
543
570
  request?: string | undefined;
@@ -545,12 +572,12 @@ export declare const config: {
545
572
  context?: string | undefined;
546
573
  dependencyType?: string | undefined;
547
574
  request?: string | undefined;
548
- }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "promise" | "module" | "jsonp" | "import" | "amd" | "commonjs" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "system" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
575
+ }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "module" | "promise" | "script" | "commonjs" | "jsonp" | "import" | "amd" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "system" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: {
549
576
  context?: string | undefined;
550
577
  dependencyType?: string | undefined;
551
578
  request?: string | undefined;
552
579
  }, ...args_1: unknown[]) => Promise<string | boolean | string[] | Record<string, string | string[]>>))[] | undefined;
553
- externalsType?: "promise" | "module" | "jsonp" | "import" | "amd" | "commonjs" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "system" | "script" | "node-commonjs" | undefined;
580
+ externalsType?: "module" | "promise" | "script" | "commonjs" | "jsonp" | "import" | "amd" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd" | "umd2" | "system" | "node-commonjs" | undefined;
554
581
  externalsPresets?: {
555
582
  node?: boolean | undefined;
556
583
  web?: boolean | undefined;
@@ -585,9 +612,9 @@ export declare const config: {
585
612
  stdin?: boolean | undefined;
586
613
  } | undefined;
587
614
  watch?: boolean | undefined;
588
- stats?: boolean | "normal" | "none" | "verbose" | "errors-only" | "errors-warnings" | {
615
+ stats?: boolean | "none" | "normal" | "verbose" | "errors-only" | "errors-warnings" | {
589
616
  all?: boolean | undefined;
590
- preset?: "normal" | "none" | "verbose" | "errors-only" | "errors-warnings" | undefined;
617
+ preset?: "none" | "normal" | "verbose" | "errors-only" | "errors-warnings" | undefined;
591
618
  assets?: boolean | undefined;
592
619
  chunks?: boolean | undefined;
593
620
  modules?: boolean | undefined;
@@ -638,7 +665,7 @@ export declare const config: {
638
665
  minimizer?: (false | "" | 0 | import("./config").RspackPluginInstance | "..." | import("./config").RspackPluginFunction | null | undefined)[] | undefined;
639
666
  mergeDuplicateChunks?: boolean | undefined;
640
667
  splitChunks?: false | {
641
- chunks?: RegExp | "async" | "all" | "initial" | ((args_0: import("./Chunk").Chunk, ...args_1: unknown[]) => boolean) | undefined;
668
+ chunks?: RegExp | "async" | "initial" | "all" | ((args_0: import("./Chunk").Chunk, ...args_1: unknown[]) => boolean) | undefined;
642
669
  minChunks?: number | undefined;
643
670
  name?: string | false | ((args_0: import("./Module").Module | undefined, ...args_1: unknown[]) => unknown) | undefined;
644
671
  minSize?: number | undefined;
@@ -647,7 +674,7 @@ export declare const config: {
647
674
  maxInitialSize?: number | undefined;
648
675
  automaticNameDelimiter?: string | undefined;
649
676
  cacheGroups?: Record<string, false | {
650
- chunks?: RegExp | "async" | "all" | "initial" | ((args_0: import("./Chunk").Chunk, ...args_1: unknown[]) => boolean) | undefined;
677
+ chunks?: RegExp | "async" | "initial" | "all" | ((args_0: import("./Chunk").Chunk, ...args_1: unknown[]) => boolean) | undefined;
651
678
  minChunks?: number | undefined;
652
679
  name?: string | false | ((args_0: import("./Module").Module | undefined, ...args_1: unknown[]) => unknown) | undefined;
653
680
  minSize?: number | undefined;
@@ -666,7 +693,7 @@ export declare const config: {
666
693
  maxAsyncRequests?: number | undefined;
667
694
  maxInitialRequests?: number | undefined;
668
695
  fallbackCacheGroup?: {
669
- chunks?: RegExp | "async" | "all" | "initial" | ((args_0: import("./Chunk").Chunk, ...args_1: unknown[]) => boolean) | undefined;
696
+ chunks?: RegExp | "async" | "initial" | "all" | ((args_0: import("./Chunk").Chunk, ...args_1: unknown[]) => boolean) | undefined;
670
697
  minSize?: number | undefined;
671
698
  maxSize?: number | undefined;
672
699
  maxAsyncSize?: number | undefined;
@@ -675,7 +702,7 @@ export declare const config: {
675
702
  } | undefined;
676
703
  hidePathInfo?: boolean | undefined;
677
704
  } | undefined;
678
- runtimeChunk?: boolean | "single" | "multiple" | {
705
+ runtimeChunk?: boolean | "multiple" | "single" | {
679
706
  name?: string | ((...args: unknown[]) => string | undefined) | undefined;
680
707
  } | undefined;
681
708
  removeAvailableModules?: boolean | undefined;
@@ -703,6 +730,15 @@ export declare const config: {
703
730
  maxSize?: number | undefined;
704
731
  } | undefined;
705
732
  } | undefined;
733
+ css?: {
734
+ namedExports?: boolean | undefined;
735
+ } | undefined;
736
+ "css/auto"?: {
737
+ namedExports?: boolean | undefined;
738
+ } | undefined;
739
+ "css/module"?: {
740
+ namedExports?: boolean | undefined;
741
+ } | undefined;
706
742
  javascript?: {
707
743
  dynamicImportMode?: "eager" | "lazy" | undefined;
708
744
  dynamicImportPreload?: number | boolean | undefined;
@@ -735,6 +771,20 @@ export declare const config: {
735
771
  filename?: string | undefined;
736
772
  publicPath?: string | undefined;
737
773
  } | undefined;
774
+ css?: {
775
+ exportsConvention?: "as-is" | "camel-case" | "camel-case-only" | "dashes" | "dashes-only" | undefined;
776
+ exportsOnly?: boolean | undefined;
777
+ } | undefined;
778
+ "css/auto"?: {
779
+ exportsConvention?: "as-is" | "camel-case" | "camel-case-only" | "dashes" | "dashes-only" | undefined;
780
+ exportsOnly?: boolean | undefined;
781
+ localIdentName?: string | undefined;
782
+ } | undefined;
783
+ "css/module"?: {
784
+ exportsConvention?: "as-is" | "camel-case" | "camel-case-only" | "dashes" | "dashes-only" | undefined;
785
+ exportsOnly?: boolean | undefined;
786
+ localIdentName?: string | undefined;
787
+ } | undefined;
738
788
  } | undefined;
739
789
  noParse?: string | RegExp | ((args_0: string, ...args_1: unknown[]) => boolean) | (string | RegExp | ((args_0: string, ...args_1: unknown[]) => boolean))[] | undefined;
740
790
  } | undefined;
@@ -875,5 +925,3 @@ export { EvalSourceMapDevToolPlugin } from "./builtin-plugin";
875
925
  export type { SourceMapDevToolPluginOptions } from "./builtin-plugin";
876
926
  export { EvalDevToolModulePlugin } from "./builtin-plugin";
877
927
  export type { EvalDevToolModulePluginOptions } from "./builtin-plugin";
878
- export { RSCClientEntryPlugin } from "./builtin-plugin";
879
- export { RSCClientReferenceManifestRspackPlugin } from "./builtin-plugin";
package/dist/exports.js CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.RSCClientReferenceManifestRspackPlugin = exports.RSCClientEntryPlugin = exports.EvalDevToolModulePlugin = exports.EvalSourceMapDevToolPlugin = exports.SourceMapDevToolPlugin = exports.CopyRspackPlugin = exports.SwcCssMinimizerRspackPlugin = exports.SwcJsMinimizerRspackPlugin = exports.HtmlRspackPlugin = exports.sharing = exports.container = exports.optimize = exports.webworker = exports.javascript = exports.wasm = exports.library = exports.electron = exports.node = exports.NormalModuleReplacementPlugin = exports.EnvironmentPlugin = exports.LoaderTargetPlugin = exports.LoaderOptionsPlugin = exports.HotModuleReplacementPlugin = exports.ExternalsPlugin = exports.EntryPlugin = exports.ProgressPlugin = exports.DefinePlugin = exports.ProvidePlugin = exports.BannerPlugin = exports.EntryOptionPlugin = exports.experimental_cleanupGlobalTrace = exports.experimental_registerGlobalTrace = exports.util = exports.config = exports.sources = exports.WebpackError = exports.Template = exports.ModuleFilenameHelpers = exports.NormalModule = exports.MultiStats = exports.Stats = exports.RuntimeGlobals = exports.WebpackOptionsApply = exports.RspackOptionsApply = exports.MultiCompiler = exports.Compilation = exports.Compiler = exports.rspackVersion = exports.version = void 0;
6
+ exports.EvalDevToolModulePlugin = exports.EvalSourceMapDevToolPlugin = exports.SourceMapDevToolPlugin = exports.CopyRspackPlugin = exports.SwcCssMinimizerRspackPlugin = exports.SwcJsMinimizerRspackPlugin = exports.HtmlRspackPlugin = exports.sharing = exports.container = exports.optimize = exports.webworker = exports.javascript = exports.wasm = exports.library = exports.electron = exports.node = exports.NormalModuleReplacementPlugin = exports.EnvironmentPlugin = exports.LoaderTargetPlugin = exports.LoaderOptionsPlugin = exports.HotModuleReplacementPlugin = exports.ExternalsPlugin = exports.EntryPlugin = exports.ProgressPlugin = exports.DefinePlugin = exports.ProvidePlugin = exports.BannerPlugin = exports.EntryOptionPlugin = exports.experimental_cleanupGlobalTrace = exports.experimental_registerGlobalTrace = exports.util = exports.config = exports.sources = exports.WebpackError = exports.Template = exports.ModuleFilenameHelpers = exports.NormalModule = exports.MultiStats = exports.Stats = exports.RuntimeGlobals = exports.WebpackOptionsApply = exports.RspackOptionsApply = exports.MultiCompiler = exports.Compilation = exports.Compiler = exports.rspackVersion = exports.version = void 0;
7
7
  const { version: rspackVersion, webpackVersion } = require("../package.json");
8
8
  exports.rspackVersion = rspackVersion;
9
9
  exports.version = webpackVersion;
@@ -117,7 +117,3 @@ var builtin_plugin_20 = require("./builtin-plugin");
117
117
  Object.defineProperty(exports, "EvalSourceMapDevToolPlugin", { enumerable: true, get: function () { return builtin_plugin_20.EvalSourceMapDevToolPlugin; } });
118
118
  var builtin_plugin_21 = require("./builtin-plugin");
119
119
  Object.defineProperty(exports, "EvalDevToolModulePlugin", { enumerable: true, get: function () { return builtin_plugin_21.EvalDevToolModulePlugin; } });
120
- var builtin_plugin_22 = require("./builtin-plugin");
121
- Object.defineProperty(exports, "RSCClientEntryPlugin", { enumerable: true, get: function () { return builtin_plugin_22.RSCClientEntryPlugin; } });
122
- var builtin_plugin_23 = require("./builtin-plugin");
123
- Object.defineProperty(exports, "RSCClientReferenceManifestRspackPlugin", { enumerable: true, get: function () { return builtin_plugin_23.RSCClientReferenceManifestRspackPlugin; } });
@@ -44,7 +44,7 @@ class EntryOptionPlugin {
44
44
  filename: desc.filename,
45
45
  runtime: desc.runtime,
46
46
  // layer: desc.layer,
47
- // dependOn: desc.dependOn,
47
+ dependOn: desc.dependOn,
48
48
  baseUri: desc.baseUri,
49
49
  publicPath: desc.publicPath,
50
50
  chunkLoading: desc.chunkLoading,
@@ -97,7 +97,7 @@ class RspackOptionsApply {
97
97
  .runtimeChunk;
98
98
  if (runtimeChunk) {
99
99
  Object.entries(options.entry).forEach(([entryName, value]) => {
100
- if (value.runtime === undefined) {
100
+ if (value.runtime === undefined && !value.dependOn) {
101
101
  value.runtime = runtimeChunk.name({ name: entryName });
102
102
  }
103
103
  });
@@ -137,6 +137,9 @@ class RspackOptionsApply {
137
137
  if (options.experiments.asyncWebAssembly) {
138
138
  new builtin_plugin_1.AsyncWebAssemblyModulesPlugin().apply(compiler);
139
139
  }
140
+ if (options.experiments.css) {
141
+ new builtin_plugin_1.CssModulesPlugin().apply(compiler);
142
+ }
140
143
  if (options.experiments.rspackFuture.disableApplyEntryLazily) {
141
144
  applyEntryOptions(compiler, options);
142
145
  }
@@ -16,5 +16,5 @@ export declare const compareIds: (a: string | number, b: string | number) => -1
16
16
  export declare const compareChunksById: (a: Chunk, b: Chunk) => -1 | 0 | 1;
17
17
  export declare const compareChunkGroupsByIndex: (a: ChunkGroup, b: ChunkGroup) => -1 | 0 | 1;
18
18
  export declare const compareSelect: <T, R>(getter: Selector<T, R>, comparator: Comparator) => Comparator;
19
- export declare const compareNumbers: (a: number, b: number) => 1 | -1 | 0;
19
+ export declare const compareNumbers: (a: number, b: number) => 0 | 1 | -1;
20
20
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/core",
3
- "version": "0.5.9-canary-4297cec-20240402080759",
3
+ "version": "0.5.9-canary-5be4c34-20240403005129",
4
4
  "webpackVersion": "5.75.0",
5
5
  "license": "MIT",
6
6
  "description": "A Fast Rust-based Web Bundler",
@@ -56,8 +56,8 @@
56
56
  "styled-components": "^6.0.8",
57
57
  "terser": "5.27.2",
58
58
  "wast-loader": "^1.11.4",
59
- "@rspack/core": "0.5.9-canary-4297cec-20240402080759",
60
- "@rspack/plugin-minify": "^0.5.9-canary-4297cec-20240402080759"
59
+ "@rspack/plugin-minify": "^0.5.9-canary-5be4c34-20240403005129",
60
+ "@rspack/core": "0.5.9-canary-5be4c34-20240403005129"
61
61
  },
62
62
  "dependencies": {
63
63
  "@module-federation/runtime-tools": "0.0.8",
@@ -72,7 +72,7 @@
72
72
  "webpack-sources": "3.2.3",
73
73
  "zod": "^3.21.4",
74
74
  "zod-validation-error": "1.3.1",
75
- "@rspack/binding": "0.5.9-canary-4297cec-20240402080759"
75
+ "@rspack/binding": "0.5.9-canary-5be4c34-20240403005129"
76
76
  },
77
77
  "peerDependencies": {
78
78
  "@swc/helpers": ">=0.5.1"
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RSCClientEntryPlugin = void 0;
4
- const binding_1 = require("@rspack/binding");
5
- const base_1 = require("./base");
6
- exports.RSCClientEntryPlugin = (0, base_1.create)(binding_1.BuiltinPluginName.RSCClientEntryRspackPlugin, () => { }, "compilation");
@@ -1,10 +0,0 @@
1
- import { BuiltinPluginName } from "@rspack/binding";
2
- export declare const RSCClientReferenceManifestRspackPlugin: {
3
- new (): {
4
- name: BuiltinPluginName;
5
- _options: void;
6
- affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
- raw(): import("@rspack/binding").BuiltinPlugin;
8
- apply(compiler: import("../Compiler").Compiler): void;
9
- };
10
- };
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RSCClientReferenceManifestRspackPlugin = void 0;
4
- const binding_1 = require("@rspack/binding");
5
- const base_1 = require("./base");
6
- exports.RSCClientReferenceManifestRspackPlugin = (0, base_1.create)(binding_1.BuiltinPluginName.RSCClientReferenceManifestRspackPlugin, () => { }, "compilation");