@rspack/core 0.6.5-canary-0a5cf0d-20240508123903 → 0.6.5-canary-00f90f0-20240510072319

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.
@@ -1,4 +1,5 @@
1
1
  import { type JsChunkGroup, type JsCompilation } from "@rspack/binding";
2
+ import { Chunk } from "./Chunk";
2
3
  export declare class ChunkGroup {
3
4
  #private;
4
5
  static __from_binding(chunk: JsChunkGroup, compilation: JsCompilation): ChunkGroup;
@@ -7,6 +8,7 @@ export declare class ChunkGroup {
7
8
  getParents(): ChunkGroup[];
8
9
  get index(): number | undefined;
9
10
  get name(): string | undefined;
11
+ get chunks(): Chunk[];
10
12
  __internal_inner_ukey(): number;
11
13
  __internal_inner_compilation(): JsCompilation;
12
14
  }
@@ -14,6 +14,7 @@ var _ChunkGroup_inner, _ChunkGroup_inner_compilation;
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.ChunkGroup = void 0;
16
16
  const binding_1 = require("@rspack/binding");
17
+ const Chunk_1 = require("./Chunk");
17
18
  class ChunkGroup {
18
19
  static __from_binding(chunk, compilation) {
19
20
  return new ChunkGroup(chunk, compilation);
@@ -45,6 +46,9 @@ class ChunkGroup {
45
46
  get name() {
46
47
  return __classPrivateFieldGet(this, _ChunkGroup_inner, "f").name;
47
48
  }
49
+ get chunks() {
50
+ return __classPrivateFieldGet(this, _ChunkGroup_inner, "f").chunks.map(c => Chunk_1.Chunk.__from_binding(c, __classPrivateFieldGet(this, _ChunkGroup_inner_compilation, "f")));
51
+ }
48
52
  __internal_inner_ukey() {
49
53
  return __classPrivateFieldGet(this, _ChunkGroup_inner, "f").__inner_ukey;
50
54
  }
@@ -0,0 +1,15 @@
1
+ import { BuiltinPluginName, RawSizeLimitsPluginOptions } from "@rspack/binding";
2
+ export declare const SizeLimitsPlugin: {
3
+ new (options: {
4
+ assetFilter?: ((args_0: string, ...args_1: unknown[]) => boolean) | undefined;
5
+ hints?: false | "error" | "warning" | undefined;
6
+ maxAssetSize?: number | undefined;
7
+ maxEntrypointSize?: number | undefined;
8
+ }): {
9
+ name: BuiltinPluginName;
10
+ _options: RawSizeLimitsPluginOptions;
11
+ affectedHooks: "done" | "compilation" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
12
+ raw(): import("@rspack/binding").BuiltinPlugin;
13
+ apply(compiler: import("../Compiler").Compiler): void;
14
+ };
15
+ };
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SizeLimitsPlugin = void 0;
4
+ const binding_1 = require("@rspack/binding");
5
+ const base_1 = require("./base");
6
+ exports.SizeLimitsPlugin = (0, base_1.create)(binding_1.BuiltinPluginName.SizeLimitsPlugin, (options) => {
7
+ const hints = options.hints === false ? undefined : options.hints;
8
+ return { ...options, hints };
9
+ });
@@ -51,6 +51,7 @@ export * from "./ModuleConcatenationPlugin";
51
51
  export * from "./CssModulesPlugin";
52
52
  export * from "./APIPlugin";
53
53
  export * from "./RuntimeChunkPlugin";
54
+ export * from "./SizeLimitsPlugin";
54
55
  export * from "./HtmlRspackPlugin";
55
56
  export * from "./CopyRspackPlugin";
56
57
  export * from "./SwcJsMinimizerPlugin";
@@ -69,6 +69,7 @@ __exportStar(require("./ModuleConcatenationPlugin"), exports);
69
69
  __exportStar(require("./CssModulesPlugin"), exports);
70
70
  __exportStar(require("./APIPlugin"), exports);
71
71
  __exportStar(require("./RuntimeChunkPlugin"), exports);
72
+ __exportStar(require("./SizeLimitsPlugin"), exports);
72
73
  __exportStar(require("./HtmlRspackPlugin"), exports);
73
74
  __exportStar(require("./CopyRspackPlugin"), exports);
74
75
  __exportStar(require("./SwcJsMinimizerPlugin"), exports);
@@ -83,6 +83,14 @@ const applyRspackOptionsDefaults = (options) => {
83
83
  : "var";
84
84
  });
85
85
  applyNodeDefaults(options.node, { targetProperties });
86
+ F(options, "performance", () => production &&
87
+ targetProperties &&
88
+ (targetProperties.browser || targetProperties.browser === null)
89
+ ? {}
90
+ : false);
91
+ applyPerformanceDefaults(options.performance, {
92
+ production
93
+ });
86
94
  applyOptimizationDefaults(options.optimization, {
87
95
  production,
88
96
  development,
@@ -615,6 +623,13 @@ const applyNodeDefaults = (node, { targetProperties }) => {
615
623
  return "warn-mock";
616
624
  });
617
625
  };
626
+ const applyPerformanceDefaults = (performance, { production }) => {
627
+ if (performance === false)
628
+ return;
629
+ D(performance, "maxAssetSize", 250000);
630
+ D(performance, "maxEntrypointSize", 250000);
631
+ F(performance, "hints", () => (production ? "warning" : false));
632
+ };
618
633
  const applyOptimizationDefaults = (optimization, { production, development, css }) => {
619
634
  D(optimization, "removeAvailableModules", true);
620
635
  D(optimization, "removeEmptyChunks", true);
@@ -8,7 +8,7 @@
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
10
  import type { Compilation } from "../Compilation";
11
- import type { Context, Dependencies, Node, DevTool, Externals, ExternalsPresets, ExternalsType, InfrastructureLogging, LibraryOptions, Mode, Name, Resolve, Target, SnapshotOptions, CacheOptions, StatsValue, Optimization, Plugins, Watch, WatchOptions, DevServer, Profile, Bail, Builtins, EntryRuntime, ChunkLoading, PublicPath, EntryFilename, Path, Clean, Filename, ChunkFilename, CrossOriginLoading, CssFilename, CssChunkFilename, HotUpdateMainFilename, HotUpdateChunkFilename, AssetModuleFilename, UniqueName, ChunkLoadingGlobal, EnabledLibraryTypes, OutputModule, StrictModuleErrorHandling, GlobalObject, ImportFunctionName, Iife, WasmLoading, EnabledWasmLoadingTypes, WebassemblyModuleFilename, TrustedTypes, SourceMapFilename, HashDigest, HashDigestLength, HashFunction, HashSalt, WorkerPublicPath, RuleSetRules, ParserOptionsByModuleType, GeneratorOptionsByModuleType, RspackFutureOptions, HotUpdateGlobal, ScriptType, NoParseOption, DevtoolNamespace, DevtoolModuleFilenameTemplate, DevtoolFallbackModuleFilenameTemplate, RspackOptions } from "./zod";
11
+ import type { Context, Dependencies, Node, DevTool, Externals, ExternalsPresets, ExternalsType, InfrastructureLogging, LibraryOptions, Mode, Name, Resolve, Target, SnapshotOptions, CacheOptions, StatsValue, Optimization, Performance, Plugins, Watch, WatchOptions, DevServer, Profile, Bail, Builtins, EntryRuntime, ChunkLoading, PublicPath, EntryFilename, Path, Clean, Filename, ChunkFilename, CrossOriginLoading, CssFilename, CssChunkFilename, HotUpdateMainFilename, HotUpdateChunkFilename, AssetModuleFilename, UniqueName, ChunkLoadingGlobal, EnabledLibraryTypes, OutputModule, StrictModuleErrorHandling, GlobalObject, ImportFunctionName, Iife, WasmLoading, EnabledWasmLoadingTypes, WebassemblyModuleFilename, TrustedTypes, SourceMapFilename, HashDigest, HashDigestLength, HashFunction, HashSalt, WorkerPublicPath, RuleSetRules, ParserOptionsByModuleType, GeneratorOptionsByModuleType, RspackFutureOptions, HotUpdateGlobal, ScriptType, NoParseOption, DevtoolNamespace, DevtoolModuleFilenameTemplate, DevtoolFallbackModuleFilenameTemplate, RspackOptions } from "./zod";
12
12
  export declare const getNormalizedRspackOptions: (config: RspackOptions) => RspackOptionsNormalized;
13
13
  export type EntryDynamicNormalized = () => Promise<EntryStaticNormalized>;
14
14
  export type EntryNormalized = EntryDynamicNormalized | EntryStaticNormalized;
@@ -120,6 +120,7 @@ export interface RspackOptionsNormalized {
120
120
  watchOptions: WatchOptions;
121
121
  devServer?: DevServer;
122
122
  ignoreWarnings?: IgnoreWarningsNormalized;
123
+ performance?: Performance;
123
124
  profile?: Profile;
124
125
  bail?: Bail;
125
126
  builtins: Builtins;
@@ -187,6 +187,7 @@ const getNormalizedRspackOptions = (config) => {
187
187
  })
188
188
  };
189
189
  }),
190
+ performance: config.performance,
190
191
  plugins: nestedArray(config.plugins, p => [...p]),
191
192
  experiments: nestedConfig(config.experiments, experiments => ({
192
193
  ...experiments
@@ -2,7 +2,7 @@
2
2
  import { RawFuncUseCtx, JsAssetInfo } from "@rspack/binding";
3
3
  import { z } from "../../compiled/zod";
4
4
  import { Compilation, Compiler } from "..";
5
- import type * as oldBuiltins from "../builtin-plugin";
5
+ import type { Builtins as BuiltinsType } from "../builtin-plugin";
6
6
  import type * as webpackDevServer from "webpack-dev-server";
7
7
  import { Module } from "../Module";
8
8
  import { Chunk } from "../Chunk";
@@ -1334,6 +1334,9 @@ declare const baseResolveOptions: z.ZodObject<{
1334
1334
  preferRelative: z.ZodOptional<z.ZodBoolean>;
1335
1335
  preferAbsolute: z.ZodOptional<z.ZodBoolean>;
1336
1336
  symlinks: z.ZodOptional<z.ZodBoolean>;
1337
+ enforceExtension: z.ZodOptional<z.ZodBoolean>;
1338
+ importsFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1339
+ descriptionFiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1337
1340
  tsConfigPath: z.ZodOptional<z.ZodString>;
1338
1341
  tsConfig: z.ZodOptional<z.ZodObject<{
1339
1342
  configFile: z.ZodString;
@@ -1363,6 +1366,9 @@ declare const baseResolveOptions: z.ZodObject<{
1363
1366
  preferRelative?: boolean | undefined;
1364
1367
  preferAbsolute?: boolean | undefined;
1365
1368
  symlinks?: boolean | undefined;
1369
+ enforceExtension?: boolean | undefined;
1370
+ importsFields?: string[] | undefined;
1371
+ descriptionFiles?: string[] | undefined;
1366
1372
  tsConfigPath?: string | undefined;
1367
1373
  tsConfig?: {
1368
1374
  configFile: string;
@@ -1386,6 +1392,9 @@ declare const baseResolveOptions: z.ZodObject<{
1386
1392
  preferRelative?: boolean | undefined;
1387
1393
  preferAbsolute?: boolean | undefined;
1388
1394
  symlinks?: boolean | undefined;
1395
+ enforceExtension?: boolean | undefined;
1396
+ importsFields?: string[] | undefined;
1397
+ descriptionFiles?: string[] | undefined;
1389
1398
  tsConfigPath?: string | undefined;
1390
1399
  tsConfig?: {
1391
1400
  configFile: string;
@@ -4533,7 +4542,24 @@ declare const profile: z.ZodBoolean;
4533
4542
  export type Profile = z.infer<typeof profile>;
4534
4543
  declare const bail: z.ZodBoolean;
4535
4544
  export type Bail = z.infer<typeof bail>;
4536
- declare const builtins: z.ZodType<oldBuiltins.Builtins, z.ZodTypeDef, oldBuiltins.Builtins>;
4545
+ declare const performance: z.ZodUnion<[z.ZodObject<{
4546
+ assetFilter: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodBoolean>>;
4547
+ hints: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["error", "warning"]>, z.ZodLiteral<false>]>>;
4548
+ maxAssetSize: z.ZodOptional<z.ZodNumber>;
4549
+ maxEntrypointSize: z.ZodOptional<z.ZodNumber>;
4550
+ }, "strict", z.ZodTypeAny, {
4551
+ assetFilter?: ((args_0: string, ...args_1: unknown[]) => boolean) | undefined;
4552
+ hints?: false | "error" | "warning" | undefined;
4553
+ maxAssetSize?: number | undefined;
4554
+ maxEntrypointSize?: number | undefined;
4555
+ }, {
4556
+ assetFilter?: ((args_0: string, ...args_1: unknown[]) => boolean) | undefined;
4557
+ hints?: false | "error" | "warning" | undefined;
4558
+ maxAssetSize?: number | undefined;
4559
+ maxEntrypointSize?: number | undefined;
4560
+ }>, z.ZodLiteral<false>]>;
4561
+ export type Performance = z.infer<typeof performance>;
4562
+ declare const builtins: z.ZodType<BuiltinsType, z.ZodTypeDef, BuiltinsType>;
4537
4563
  export type Builtins = z.infer<typeof builtins>;
4538
4564
  export declare const rspackOptions: z.ZodObject<{
4539
4565
  name: z.ZodOptional<z.ZodString>;
@@ -5777,7 +5803,7 @@ export declare const rspackOptions: z.ZodObject<{
5777
5803
  resolveLoader: z.ZodOptional<z.ZodType<ResolveOptions, z.ZodTypeDef, ResolveOptions>>;
5778
5804
  plugins: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodType<RspackPluginInstance, z.ZodTypeDef, RspackPluginInstance>, z.ZodType<RspackPluginFunction, z.ZodTypeDef, RspackPluginFunction>, z.ZodUnion<[z.ZodLiteral<false>, z.ZodLiteral<0>, z.ZodLiteral<"">, z.ZodNull, z.ZodUndefined]>]>, "many">>;
5779
5805
  devServer: z.ZodOptional<z.ZodType<DevServer, z.ZodTypeDef, DevServer>>;
5780
- builtins: z.ZodOptional<z.ZodType<oldBuiltins.Builtins, z.ZodTypeDef, oldBuiltins.Builtins>>;
5806
+ builtins: z.ZodOptional<z.ZodType<BuiltinsType, z.ZodTypeDef, BuiltinsType>>;
5781
5807
  module: z.ZodOptional<z.ZodObject<{
5782
5808
  defaultRules: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"...">, z.ZodType<RuleSetRule, z.ZodTypeDef, RuleSetRule>]>, z.ZodUnion<[z.ZodLiteral<false>, z.ZodLiteral<0>, z.ZodLiteral<"">, z.ZodNull, z.ZodUndefined]>]>, "many">>;
5783
5809
  rules: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"...">, z.ZodType<RuleSetRule, z.ZodTypeDef, RuleSetRule>]>, z.ZodUnion<[z.ZodLiteral<false>, z.ZodLiteral<0>, z.ZodLiteral<"">, z.ZodNull, z.ZodUndefined]>]>, "many">>;
@@ -6411,6 +6437,22 @@ export declare const rspackOptions: z.ZodObject<{
6411
6437
  }>>;
6412
6438
  profile: z.ZodOptional<z.ZodBoolean>;
6413
6439
  bail: z.ZodOptional<z.ZodBoolean>;
6440
+ performance: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
6441
+ assetFilter: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodBoolean>>;
6442
+ hints: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["error", "warning"]>, z.ZodLiteral<false>]>>;
6443
+ maxAssetSize: z.ZodOptional<z.ZodNumber>;
6444
+ maxEntrypointSize: z.ZodOptional<z.ZodNumber>;
6445
+ }, "strict", z.ZodTypeAny, {
6446
+ assetFilter?: ((args_0: string, ...args_1: unknown[]) => boolean) | undefined;
6447
+ hints?: false | "error" | "warning" | undefined;
6448
+ maxAssetSize?: number | undefined;
6449
+ maxEntrypointSize?: number | undefined;
6450
+ }, {
6451
+ assetFilter?: ((args_0: string, ...args_1: unknown[]) => boolean) | undefined;
6452
+ hints?: false | "error" | "warning" | undefined;
6453
+ maxAssetSize?: number | undefined;
6454
+ maxEntrypointSize?: number | undefined;
6455
+ }>, z.ZodLiteral<false>]>>;
6414
6456
  }, "strict", z.ZodTypeAny, {
6415
6457
  name?: string | undefined;
6416
6458
  dependencies?: string[] | undefined;
@@ -6729,7 +6771,7 @@ export declare const rspackOptions: z.ZodObject<{
6729
6771
  resolveLoader?: ResolveOptions | undefined;
6730
6772
  plugins?: (false | "" | 0 | RspackPluginInstance | RspackPluginFunction | null | undefined)[] | undefined;
6731
6773
  devServer?: DevServer | undefined;
6732
- builtins?: oldBuiltins.Builtins | undefined;
6774
+ builtins?: BuiltinsType | undefined;
6733
6775
  module?: {
6734
6776
  defaultRules?: (false | "" | 0 | "..." | RuleSetRule | null | undefined)[] | undefined;
6735
6777
  rules?: (false | "" | 0 | "..." | RuleSetRule | null | undefined)[] | undefined;
@@ -6827,6 +6869,12 @@ export declare const rspackOptions: z.ZodObject<{
6827
6869
  } | undefined;
6828
6870
  profile?: boolean | undefined;
6829
6871
  bail?: boolean | undefined;
6872
+ performance?: false | {
6873
+ assetFilter?: ((args_0: string, ...args_1: unknown[]) => boolean) | undefined;
6874
+ hints?: false | "error" | "warning" | undefined;
6875
+ maxAssetSize?: number | undefined;
6876
+ maxEntrypointSize?: number | undefined;
6877
+ } | undefined;
6830
6878
  }, {
6831
6879
  name?: string | undefined;
6832
6880
  dependencies?: string[] | undefined;
@@ -7145,7 +7193,7 @@ export declare const rspackOptions: z.ZodObject<{
7145
7193
  resolveLoader?: ResolveOptions | undefined;
7146
7194
  plugins?: (false | "" | 0 | RspackPluginInstance | RspackPluginFunction | null | undefined)[] | undefined;
7147
7195
  devServer?: DevServer | undefined;
7148
- builtins?: oldBuiltins.Builtins | undefined;
7196
+ builtins?: BuiltinsType | undefined;
7149
7197
  module?: {
7150
7198
  defaultRules?: (false | "" | 0 | "..." | RuleSetRule | null | undefined)[] | undefined;
7151
7199
  rules?: (false | "" | 0 | "..." | RuleSetRule | null | undefined)[] | undefined;
@@ -7243,6 +7291,12 @@ export declare const rspackOptions: z.ZodObject<{
7243
7291
  } | undefined;
7244
7292
  profile?: boolean | undefined;
7245
7293
  bail?: boolean | undefined;
7294
+ performance?: false | {
7295
+ assetFilter?: ((args_0: string, ...args_1: unknown[]) => boolean) | undefined;
7296
+ hints?: false | "error" | "warning" | undefined;
7297
+ maxAssetSize?: number | undefined;
7298
+ maxEntrypointSize?: number | undefined;
7299
+ } | undefined;
7246
7300
  }>;
7247
7301
  export type RspackOptions = z.infer<typeof rspackOptions>;
7248
7302
  export type Configuration = RspackOptions;
@@ -242,6 +242,9 @@ const baseResolveOptions = zod_1.z.strictObject({
242
242
  preferRelative: zod_1.z.boolean().optional(),
243
243
  preferAbsolute: zod_1.z.boolean().optional(),
244
244
  symlinks: zod_1.z.boolean().optional(),
245
+ enforceExtension: zod_1.z.boolean().optional(),
246
+ importsFields: zod_1.z.array(zod_1.z.string()).optional(),
247
+ descriptionFiles: zod_1.z.array(zod_1.z.string()).optional(),
245
248
  tsConfigPath: zod_1.z.string().optional(),
246
249
  tsConfig: resolveTsconfig.optional(),
247
250
  fullySpecified: zod_1.z.boolean().optional(),
@@ -809,6 +812,16 @@ const profile = zod_1.z.boolean();
809
812
  //#region Bail
810
813
  const bail = zod_1.z.boolean();
811
814
  //#endregion
815
+ //#region Performance
816
+ const performance = zod_1.z
817
+ .strictObject({
818
+ assetFilter: zod_1.z.function().args(zod_1.z.string()).returns(zod_1.z.boolean()).optional(),
819
+ hints: zod_1.z.enum(["error", "warning"]).or(zod_1.z.literal(false)).optional(),
820
+ maxAssetSize: zod_1.z.number().optional(),
821
+ maxEntrypointSize: zod_1.z.number().optional()
822
+ })
823
+ .or(zod_1.z.literal(false));
824
+ //#endregion
812
825
  //#region Builtins (deprecated)
813
826
  const builtins = zod_1.z.custom();
814
827
  //#endregion
@@ -841,5 +854,6 @@ exports.rspackOptions = zod_1.z.strictObject({
841
854
  builtins: builtins.optional(),
842
855
  module: moduleOptions.optional(),
843
856
  profile: profile.optional(),
844
- bail: bail.optional()
857
+ bail: bail.optional(),
858
+ performance: performance.optional()
845
859
  });
package/dist/exports.d.ts CHANGED
@@ -91,9 +91,11 @@ interface Webworker {
91
91
  export declare const webworker: Webworker;
92
92
  import { LimitChunkCountPlugin } from "./builtin-plugin";
93
93
  import { RuntimeChunkPlugin } from "./builtin-plugin";
94
+ import { SplitChunksPlugin } from "./builtin-plugin";
94
95
  interface Optimize {
95
96
  LimitChunkCountPlugin: typeof LimitChunkCountPlugin;
96
97
  RuntimeChunkPlugin: typeof RuntimeChunkPlugin;
98
+ SplitChunksPlugin: typeof SplitChunksPlugin;
97
99
  }
98
100
  export declare const optimize: Optimize;
99
101
  import { ModuleFederationPlugin } from "./container/ModuleFederationPlugin";
package/dist/exports.js CHANGED
@@ -113,7 +113,12 @@ const builtin_plugin_15 = require("./builtin-plugin");
113
113
  exports.webworker = { WebWorkerTemplatePlugin: builtin_plugin_15.WebWorkerTemplatePlugin };
114
114
  const builtin_plugin_16 = require("./builtin-plugin");
115
115
  const builtin_plugin_17 = require("./builtin-plugin");
116
- exports.optimize = { LimitChunkCountPlugin: builtin_plugin_16.LimitChunkCountPlugin, RuntimeChunkPlugin: builtin_plugin_17.RuntimeChunkPlugin };
116
+ const builtin_plugin_18 = require("./builtin-plugin");
117
+ exports.optimize = {
118
+ LimitChunkCountPlugin: builtin_plugin_16.LimitChunkCountPlugin,
119
+ RuntimeChunkPlugin: builtin_plugin_17.RuntimeChunkPlugin,
120
+ SplitChunksPlugin: builtin_plugin_18.SplitChunksPlugin
121
+ };
117
122
  const ModuleFederationPlugin_1 = require("./container/ModuleFederationPlugin");
118
123
  const ModuleFederationPluginV1_1 = require("./container/ModuleFederationPluginV1");
119
124
  const ContainerPlugin_1 = require("./container/ContainerPlugin");
@@ -133,19 +138,19 @@ exports.sharing = {
133
138
  SharePlugin: SharePlugin_1.SharePlugin
134
139
  };
135
140
  ///// Rspack Postfixed Internal Plugins /////
136
- var builtin_plugin_18 = require("./builtin-plugin");
137
- Object.defineProperty(exports, "HtmlRspackPlugin", { enumerable: true, get: function () { return builtin_plugin_18.HtmlRspackPlugin; } });
138
141
  var builtin_plugin_19 = require("./builtin-plugin");
139
- Object.defineProperty(exports, "SwcJsMinimizerRspackPlugin", { enumerable: true, get: function () { return builtin_plugin_19.SwcJsMinimizerRspackPlugin; } });
142
+ Object.defineProperty(exports, "HtmlRspackPlugin", { enumerable: true, get: function () { return builtin_plugin_19.HtmlRspackPlugin; } });
140
143
  var builtin_plugin_20 = require("./builtin-plugin");
141
- Object.defineProperty(exports, "SwcCssMinimizerRspackPlugin", { enumerable: true, get: function () { return builtin_plugin_20.SwcCssMinimizerRspackPlugin; } });
144
+ Object.defineProperty(exports, "SwcJsMinimizerRspackPlugin", { enumerable: true, get: function () { return builtin_plugin_20.SwcJsMinimizerRspackPlugin; } });
142
145
  var builtin_plugin_21 = require("./builtin-plugin");
143
- Object.defineProperty(exports, "CopyRspackPlugin", { enumerable: true, get: function () { return builtin_plugin_21.CopyRspackPlugin; } });
146
+ Object.defineProperty(exports, "SwcCssMinimizerRspackPlugin", { enumerable: true, get: function () { return builtin_plugin_21.SwcCssMinimizerRspackPlugin; } });
144
147
  var builtin_plugin_22 = require("./builtin-plugin");
145
- Object.defineProperty(exports, "SourceMapDevToolPlugin", { enumerable: true, get: function () { return builtin_plugin_22.SourceMapDevToolPlugin; } });
148
+ Object.defineProperty(exports, "CopyRspackPlugin", { enumerable: true, get: function () { return builtin_plugin_22.CopyRspackPlugin; } });
146
149
  var builtin_plugin_23 = require("./builtin-plugin");
147
- Object.defineProperty(exports, "EvalSourceMapDevToolPlugin", { enumerable: true, get: function () { return builtin_plugin_23.EvalSourceMapDevToolPlugin; } });
150
+ Object.defineProperty(exports, "SourceMapDevToolPlugin", { enumerable: true, get: function () { return builtin_plugin_23.SourceMapDevToolPlugin; } });
148
151
  var builtin_plugin_24 = require("./builtin-plugin");
149
- Object.defineProperty(exports, "EvalDevToolModulePlugin", { enumerable: true, get: function () { return builtin_plugin_24.EvalDevToolModulePlugin; } });
152
+ Object.defineProperty(exports, "EvalSourceMapDevToolPlugin", { enumerable: true, get: function () { return builtin_plugin_24.EvalSourceMapDevToolPlugin; } });
150
153
  var builtin_plugin_25 = require("./builtin-plugin");
151
- Object.defineProperty(exports, "CssExtractRspackPlugin", { enumerable: true, get: function () { return builtin_plugin_25.CssExtractRspackPlugin; } });
154
+ Object.defineProperty(exports, "EvalDevToolModulePlugin", { enumerable: true, get: function () { return builtin_plugin_25.EvalDevToolModulePlugin; } });
155
+ var builtin_plugin_26 = require("./builtin-plugin");
156
+ Object.defineProperty(exports, "CssExtractRspackPlugin", { enumerable: true, get: function () { return builtin_plugin_26.CssExtractRspackPlugin; } });
@@ -216,6 +216,9 @@ class RspackOptionsApply {
216
216
  }
217
217
  }
218
218
  }
219
+ if (options.performance) {
220
+ new builtin_plugin_1.SizeLimitsPlugin(options.performance).apply(compiler);
221
+ }
219
222
  new builtin_plugin_1.WarnCaseSensitiveModulesPlugin().apply(compiler);
220
223
  new builtin_plugin_1.WorkerPlugin(options.output.workerChunkLoading, options.output.workerWasmLoading, options.output.module, options.output.workerPublicPath).apply(compiler);
221
224
  new DefaultStatsFactoryPlugin_1.DefaultStatsFactoryPlugin().apply(compiler);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/core",
3
- "version": "0.6.5-canary-0a5cf0d-20240508123903",
3
+ "version": "0.6.5-canary-00f90f0-20240510072319",
4
4
  "webpackVersion": "5.75.0",
5
5
  "license": "MIT",
6
6
  "description": "A Fast Rust-based Web Bundler",
@@ -71,8 +71,8 @@
71
71
  "watchpack": "^2.4.0",
72
72
  "zod": "^3.21.4",
73
73
  "zod-validation-error": "1.3.1",
74
- "@rspack/core": "0.6.5-canary-0a5cf0d-20240508123903",
75
- "@rspack/plugin-minify": "^0.6.5-canary-0a5cf0d-20240508123903"
74
+ "@rspack/core": "0.6.5-canary-00f90f0-20240510072319",
75
+ "@rspack/plugin-minify": "^0.6.5-canary-00f90f0-20240510072319"
76
76
  },
77
77
  "dependencies": {
78
78
  "@module-federation/runtime-tools": "0.1.6",
@@ -80,7 +80,7 @@
80
80
  "enhanced-resolve": "5.12.0",
81
81
  "tapable": "2.2.1",
82
82
  "webpack-sources": "3.2.3",
83
- "@rspack/binding": "0.6.5-canary-0a5cf0d-20240508123903"
83
+ "@rspack/binding": "0.6.5-canary-00f90f0-20240510072319"
84
84
  },
85
85
  "peerDependencies": {
86
86
  "@swc/helpers": ">=0.5.1"
@@ -94,6 +94,7 @@
94
94
  "build": "prebundle && tsc -b ./tsconfig.build.json && tsc-alias -p tsconfig.build.json",
95
95
  "build:force": "prebundle && tsc -b ./tsconfig.build.json --force && tsc-alias -p tsconfig.build.json",
96
96
  "dev": "prebundle && tsc -w",
97
+ "doc-coverage": "node scripts/check-documentation-coverage.mjs",
97
98
  "api-extractor": "api-extractor run --verbose",
98
99
  "api-extractor:ci": "api-extractor run --verbose || diff temp/api.md etc/api.md"
99
100
  }