@rspack/core 0.5.8-canary-6b6429d-20240321010409 → 0.5.8-canary-67df93d-20240322005756

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/Compilation.d.ts +6 -6
  2. package/dist/Compilation.js +1 -1
  3. package/dist/Compiler.d.ts +1 -2
  4. package/dist/Compiler.js +4 -13
  5. package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -1
  6. package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -1
  7. package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -1
  8. package/dist/builtin-plugin/BannerPlugin.d.ts +1 -1
  9. package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -1
  10. package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -1
  11. package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -1
  12. package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
  13. package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -1
  14. package/dist/builtin-plugin/DefinePlugin.d.ts +1 -1
  15. package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -1
  16. package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -1
  17. package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
  18. package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
  19. package/dist/builtin-plugin/EnableLibraryPlugin.d.ts +1 -1
  20. package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -1
  21. package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
  22. package/dist/builtin-plugin/EntryPlugin.d.ts +3 -3
  23. package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
  24. package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
  25. package/dist/builtin-plugin/ExternalsPlugin.d.ts +1 -1
  26. package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
  27. package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
  28. package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +1 -1
  29. package/dist/builtin-plugin/HtmlRspackPlugin.d.ts +1 -1
  30. package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
  31. package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
  32. package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +1 -1
  33. package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
  34. package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
  35. package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -1
  36. package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -1
  37. package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -1
  38. package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
  39. package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -1
  40. package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -1
  41. package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -1
  42. package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
  43. package/dist/builtin-plugin/ProgressPlugin.d.ts +1 -1
  44. package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -1
  45. package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -1
  46. package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
  47. package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
  48. package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
  49. package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
  50. package/dist/builtin-plugin/SwcCssMinimizerPlugin.d.ts +1 -1
  51. package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -1
  52. package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
  53. package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +1 -1
  54. package/dist/builtin-plugin/base.d.ts +1 -1
  55. package/dist/config/normalization.js +1 -1
  56. package/dist/config/zod.d.ts +351 -43
  57. package/dist/config/zod.js +8 -5
  58. package/dist/container/ContainerPlugin.d.ts +2 -2
  59. package/dist/exports.d.ts +69 -17
  60. package/package.json +5 -5
package/dist/exports.d.ts CHANGED
@@ -51,16 +51,42 @@ export declare const config: {
51
51
  } | undefined;
52
52
  umdNamedDefine?: boolean | undefined;
53
53
  } | undefined;
54
- }> | undefined;
54
+ }> | ((...args: unknown[]) => string | string[] | Record<string, string | string[] | {
55
+ import: (string | string[]) & (string | string[] | undefined);
56
+ runtime?: string | false | undefined;
57
+ publicPath?: string | undefined;
58
+ baseUri?: string | undefined;
59
+ chunkLoading?: string | false | undefined;
60
+ asyncChunks?: boolean | undefined;
61
+ wasmLoading?: string | false | undefined;
62
+ filename?: string | undefined;
63
+ library?: {
64
+ type: string;
65
+ amdContainer?: string | undefined;
66
+ auxiliaryComment?: string | {
67
+ amd?: string | undefined;
68
+ commonjs?: string | undefined;
69
+ commonjs2?: string | undefined;
70
+ root?: string | undefined;
71
+ } | undefined;
72
+ export?: string | string[] | undefined;
73
+ name?: string | string[] | {
74
+ amd?: string | undefined;
75
+ commonjs?: string | undefined;
76
+ root?: string | string[] | undefined;
77
+ } | undefined;
78
+ umdNamedDefine?: boolean | undefined;
79
+ } | undefined;
80
+ }>) | undefined;
55
81
  output?: {
56
82
  path?: string | undefined;
57
83
  clean?: boolean | undefined;
58
84
  publicPath?: string | undefined;
59
- filename?: string | undefined;
60
- chunkFilename?: string | undefined;
85
+ filename?: string | ((args_0: import("@rspack/binding").PathData, args_1: import("@rspack/binding").JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined;
86
+ chunkFilename?: string | ((args_0: import("@rspack/binding").PathData, args_1: import("@rspack/binding").JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined;
61
87
  crossOriginLoading?: false | "anonymous" | "use-credentials" | undefined;
62
- cssFilename?: string | undefined;
63
- cssChunkFilename?: string | undefined;
88
+ cssFilename?: string | ((args_0: import("@rspack/binding").PathData, args_1: import("@rspack/binding").JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined;
89
+ cssChunkFilename?: string | ((args_0: import("@rspack/binding").PathData, args_1: import("@rspack/binding").JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined;
64
90
  hotUpdateMainFilename?: string | undefined;
65
91
  hotUpdateChunkFilename?: string | undefined;
66
92
  hotUpdateGlobal?: string | undefined;
@@ -385,16 +411,42 @@ export declare const config: {
385
411
  } | undefined;
386
412
  umdNamedDefine?: boolean | undefined;
387
413
  } | undefined;
388
- }> | undefined;
414
+ }> | ((...args: unknown[]) => string | string[] | Record<string, string | string[] | {
415
+ import: (string | string[]) & (string | string[] | undefined);
416
+ runtime?: string | false | undefined;
417
+ publicPath?: string | undefined;
418
+ baseUri?: string | undefined;
419
+ chunkLoading?: string | false | undefined;
420
+ asyncChunks?: boolean | undefined;
421
+ wasmLoading?: string | false | undefined;
422
+ filename?: string | undefined;
423
+ library?: {
424
+ type: string;
425
+ amdContainer?: string | undefined;
426
+ auxiliaryComment?: string | {
427
+ amd?: string | undefined;
428
+ commonjs?: string | undefined;
429
+ commonjs2?: string | undefined;
430
+ root?: string | undefined;
431
+ } | undefined;
432
+ export?: string | string[] | undefined;
433
+ name?: string | string[] | {
434
+ amd?: string | undefined;
435
+ commonjs?: string | undefined;
436
+ root?: string | string[] | undefined;
437
+ } | undefined;
438
+ umdNamedDefine?: boolean | undefined;
439
+ } | undefined;
440
+ }>) | undefined;
389
441
  output?: {
390
442
  path?: string | undefined;
391
443
  clean?: boolean | undefined;
392
444
  publicPath?: string | undefined;
393
- filename?: string | undefined;
394
- chunkFilename?: string | undefined;
445
+ filename?: string | ((args_0: import("@rspack/binding").PathData, args_1: import("@rspack/binding").JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined;
446
+ chunkFilename?: string | ((args_0: import("@rspack/binding").PathData, args_1: import("@rspack/binding").JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined;
395
447
  crossOriginLoading?: false | "anonymous" | "use-credentials" | undefined;
396
- cssFilename?: string | undefined;
397
- cssChunkFilename?: string | undefined;
448
+ cssFilename?: string | ((args_0: import("@rspack/binding").PathData, args_1: import("@rspack/binding").JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined;
449
+ cssChunkFilename?: string | ((args_0: import("@rspack/binding").PathData, args_1: import("@rspack/binding").JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined;
398
450
  hotUpdateMainFilename?: string | undefined;
399
451
  hotUpdateChunkFilename?: string | undefined;
400
452
  hotUpdateGlobal?: string | undefined;
@@ -719,7 +771,7 @@ export declare const node: {
719
771
  new (): {
720
772
  name: import("@rspack/binding").BuiltinPluginName;
721
773
  _options: undefined;
722
- 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" | "finishModules" | "finishMake" | "entryOption" | undefined;
774
+ 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;
723
775
  raw(): import("@rspack/binding").BuiltinPlugin;
724
776
  apply(compiler: import("./Compiler").Compiler): void;
725
777
  };
@@ -731,7 +783,7 @@ export declare const electron: {
731
783
  new (context?: string | undefined): {
732
784
  name: import("@rspack/binding").BuiltinPluginName;
733
785
  _options: string;
734
- 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" | "finishModules" | "finishMake" | "entryOption" | undefined;
786
+ 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;
735
787
  raw(): import("@rspack/binding").BuiltinPlugin;
736
788
  apply(compiler: import("./Compiler").Compiler): void;
737
789
  };
@@ -742,7 +794,7 @@ export declare const library: {
742
794
  new (type: any): {
743
795
  name: import("@rspack/binding").BuiltinPluginName;
744
796
  _options: any;
745
- 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" | "finishModules" | "finishMake" | "entryOption" | undefined;
797
+ 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;
746
798
  raw(): import("@rspack/binding").BuiltinPlugin;
747
799
  apply(compiler: import("./Compiler").Compiler): void;
748
800
  };
@@ -753,7 +805,7 @@ export declare const wasm: {
753
805
  new (type: any): {
754
806
  name: import("@rspack/binding").BuiltinPluginName;
755
807
  _options: any;
756
- 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" | "finishModules" | "finishMake" | "entryOption" | undefined;
808
+ 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;
757
809
  raw(): import("@rspack/binding").BuiltinPlugin;
758
810
  apply(compiler: import("./Compiler").Compiler): void;
759
811
  };
@@ -764,7 +816,7 @@ export declare const javascript: {
764
816
  new (type: any): {
765
817
  name: import("@rspack/binding").BuiltinPluginName;
766
818
  _options: any;
767
- 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" | "finishModules" | "finishMake" | "entryOption" | undefined;
819
+ 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;
768
820
  raw(): import("@rspack/binding").BuiltinPlugin;
769
821
  apply(compiler: import("./Compiler").Compiler): void;
770
822
  };
@@ -775,7 +827,7 @@ export declare const webworker: {
775
827
  new (): {
776
828
  name: import("@rspack/binding").BuiltinPluginName;
777
829
  _options: undefined;
778
- 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" | "finishModules" | "finishMake" | "entryOption" | undefined;
830
+ 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;
779
831
  raw(): import("@rspack/binding").BuiltinPlugin;
780
832
  apply(compiler: import("./Compiler").Compiler): void;
781
833
  };
@@ -786,7 +838,7 @@ export declare const optimize: {
786
838
  new (options: import("./builtin-plugin").LimitChunkCountOptions): {
787
839
  name: import("@rspack/binding").BuiltinPluginName;
788
840
  _options: import("@rspack/binding").RawLimitChunkCountPluginOptions;
789
- 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" | "finishModules" | "finishMake" | "entryOption" | undefined;
841
+ 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;
790
842
  raw(): import("@rspack/binding").BuiltinPlugin;
791
843
  apply(compiler: import("./Compiler").Compiler): void;
792
844
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/core",
3
- "version": "0.5.8-canary-6b6429d-20240321010409",
3
+ "version": "0.5.8-canary-67df93d-20240322005756",
4
4
  "webpackVersion": "5.75.0",
5
5
  "license": "MIT",
6
6
  "description": "A Fast Rust-based Web Bundler",
@@ -45,6 +45,7 @@
45
45
  "jest-serializer-path": "^0.1.15",
46
46
  "less": "4.2.0",
47
47
  "less-loader": "^12.0.0",
48
+ "node-polyfill-webpack-plugin": "3.0.0",
48
49
  "postcss-loader": "^8.0.0",
49
50
  "postcss-pxtorem": "^6.0.0",
50
51
  "pug-loader": "^2.4.0",
@@ -55,9 +56,8 @@
55
56
  "styled-components": "^6.0.8",
56
57
  "terser": "5.27.2",
57
58
  "wast-loader": "^1.11.4",
58
- "@rspack/plugin-minify": "^0.5.8-canary-6b6429d-20240321010409",
59
- "@rspack/plugin-node-polyfill": "^0.5.8-canary-6b6429d-20240321010409",
60
- "@rspack/core": "0.5.8-canary-6b6429d-20240321010409"
59
+ "@rspack/plugin-minify": "^0.5.8-canary-67df93d-20240322005756",
60
+ "@rspack/core": "0.5.8-canary-67df93d-20240322005756"
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.8-canary-6b6429d-20240321010409"
75
+ "@rspack/binding": "0.5.8-canary-67df93d-20240322005756"
76
76
  },
77
77
  "peerDependencies": {
78
78
  "@swc/helpers": ">=0.5.1"