@rspack/core 1.0.0-beta.3 → 1.0.0-beta.5

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 (41) hide show
  1. package/dist/Compilation.d.ts +1 -7
  2. package/dist/Compilation.js +5 -13
  3. package/dist/DependenciesBlock.d.ts +8 -0
  4. package/dist/DependenciesBlock.js +30 -0
  5. package/dist/Dependency.d.ts +8 -0
  6. package/dist/Dependency.js +32 -0
  7. package/dist/Module.d.ts +6 -3
  8. package/dist/Module.js +13 -0
  9. package/dist/NormalModule.d.ts +2 -1
  10. package/dist/NormalModule.js +1 -1
  11. package/dist/builtin-plugin/ExternalsPlugin.d.ts +4 -4
  12. package/dist/builtin-plugin/HtmlRspackPlugin.d.ts +41 -10
  13. package/dist/builtin-plugin/HtmlRspackPlugin.js +16 -4
  14. package/dist/builtin-plugin/LightningCssMiminizerRspackPlugin.d.ts +2 -2
  15. package/dist/builtin-plugin/LightningCssMiminizerRspackPlugin.js +1 -7
  16. package/dist/builtin-plugin/css-extract/hmr/hotModuleReplacement.js +18 -11
  17. package/dist/builtin-plugin/css-extract/loader.d.ts +1 -1
  18. package/dist/builtin-plugin/css-extract/loader.js +2 -10
  19. package/dist/builtin-plugin/index.d.ts +0 -1
  20. package/dist/builtin-plugin/index.js +0 -1
  21. package/dist/config/adapterRuleUse.d.ts +1 -0
  22. package/dist/config/adapterRuleUse.js +2 -6
  23. package/dist/config/defaults.js +22 -13
  24. package/dist/config/zod.d.ts +199 -79
  25. package/dist/config/zod.js +10 -5
  26. package/dist/container/ContainerReferencePlugin.d.ts +1 -1
  27. package/dist/exports.d.ts +0 -1
  28. package/dist/exports.js +7 -10
  29. package/dist/loader-runner/index.js +3 -3
  30. package/dist/node/NodeWatchFileSystem.d.ts +3 -3
  31. package/dist/node/NodeWatchFileSystem.js +6 -6
  32. package/dist/stats/DefaultStatsFactoryPlugin.d.ts +0 -10
  33. package/dist/stats/DefaultStatsFactoryPlugin.js +130 -90
  34. package/dist/stats/DefaultStatsPresetPlugin.js +16 -15
  35. package/dist/stats/StatsFactory.js +5 -6
  36. package/dist/stats/statsFactoryUtils.d.ts +14 -1
  37. package/dist/stats/statsFactoryUtils.js +62 -1
  38. package/dist/util/fs.d.ts +245 -22
  39. package/package.json +3 -3
  40. package/dist/builtin-plugin/SwcCssMinimizerPlugin.d.ts +0 -16
  41. package/dist/builtin-plugin/SwcCssMinimizerPlugin.js +0 -12
@@ -1,5 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import type * as binding from "@rspack/binding";
3
+ import type { JsOriginRecord } from "@rspack/binding";
3
4
  import type { Compilation, NormalizedStatsOptions } from "../Compilation";
4
5
  import { type Comparator } from "../util/comparators";
5
6
  import type { StatsFactory, StatsFactoryContext } from "./StatsFactory";
@@ -23,8 +24,10 @@ export type KnownStatsChunkGroup = {
23
24
  prefetch?: StatsChunkGroup[];
24
25
  };
25
26
  childAssets?: {
26
- [index: string]: string[];
27
+ preload?: string[];
28
+ prefetch?: string[];
27
29
  };
30
+ isOverSizeLimit?: boolean;
28
31
  };
29
32
  export type KnownStatsChunk = {
30
33
  type: string;
@@ -70,6 +73,8 @@ export type KnownStatsAsset = {
70
73
  info: AssetInfo;
71
74
  size: number;
72
75
  emitted: boolean;
76
+ cached: boolean;
77
+ related?: StatsAsset[];
73
78
  chunkNames?: (string | number)[];
74
79
  chunkIdHints?: (string | number)[];
75
80
  chunks?: (string | null | undefined)[];
@@ -163,9 +168,12 @@ export type KnownStatsModuleReason = {
163
168
  moduleIdentifier?: string;
164
169
  module?: string;
165
170
  moduleName?: string;
171
+ resolvedModuleIdentifier?: string;
172
+ resolvedModule?: string;
166
173
  type?: string;
167
174
  userRequest?: string;
168
175
  moduleId?: string | null;
176
+ resolvedModuleId?: string | number | null;
169
177
  };
170
178
  export type StatsModuleReason = KnownStatsModuleReason & Record<string, any>;
171
179
  export type KnownStatsChunkOrigin = {
@@ -243,6 +251,7 @@ export type SimpleExtractors = {
243
251
  profile: ExtractorsByOption<binding.JsStatsModuleProfile, StatsProfile>;
244
252
  moduleReason: ExtractorsByOption<binding.JsStatsModuleReason, StatsModuleReason>;
245
253
  chunk: ExtractorsByOption<binding.JsStatsChunk, KnownStatsChunk>;
254
+ chunkOrigin: ExtractorsByOption<JsOriginRecord, StatsChunkOrigin>;
246
255
  error: ExtractorsByOption<binding.JsStatsError, StatsError>;
247
256
  warning: ExtractorsByOption<binding.JsStatsWarning, StatsError>;
248
257
  moduleTraceItem: ExtractorsByOption<binding.JsStatsModuleTrace, StatsModuleTraceItem>;
@@ -275,4 +284,8 @@ export declare const mergeToObject: (items: {
275
284
  name: string;
276
285
  }[]) => Object;
277
286
  export declare function resolveStatsMillisecond(s: binding.JsStatsMillisecond): number;
287
+ export declare const errorsSpaceLimit: (errors: StatsError[], max: number) => {
288
+ errors: StatsError[];
289
+ filtered: number;
290
+ };
278
291
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveStatsMillisecond = exports.mergeToObject = exports.moduleGroup = exports.assetGroup = exports.sortByField = exports.countWithChildren = exports.spaceLimited = exports.collapse = exports.getTotalItems = exports.iterateConfig = exports.uniqueOrderedArray = exports.uniqueArray = void 0;
3
+ exports.errorsSpaceLimit = exports.resolveStatsMillisecond = exports.mergeToObject = exports.moduleGroup = exports.assetGroup = exports.sortByField = exports.countWithChildren = exports.spaceLimited = exports.collapse = exports.getTotalItems = exports.iterateConfig = exports.uniqueOrderedArray = exports.uniqueArray = void 0;
4
4
  const comparators_1 = require("../util/comparators");
5
5
  const uniqueArray = (items, selector) => {
6
6
  const set = new Set();
@@ -279,3 +279,64 @@ function resolveStatsMillisecond(s) {
279
279
  return s.secs * 1000 + s.subsecMillis;
280
280
  }
281
281
  exports.resolveStatsMillisecond = resolveStatsMillisecond;
282
+ const errorsSpaceLimit = (errors, max) => {
283
+ let filtered = 0;
284
+ // Can not fit into limit
285
+ // print only messages
286
+ if (errors.length + 1 >= max) {
287
+ return {
288
+ errors: errors.map(error => {
289
+ if (typeof error === "string" || !error.details)
290
+ return error;
291
+ filtered++;
292
+ return { ...error, details: "" };
293
+ }),
294
+ filtered
295
+ };
296
+ }
297
+ let fullLength = errors.length;
298
+ let result = errors;
299
+ let i = 0;
300
+ for (; i < errors.length; i++) {
301
+ const error = errors[i];
302
+ if (typeof error !== "string" && error.details) {
303
+ const splitted = error.details.split("\n");
304
+ const len = splitted.length;
305
+ fullLength += len;
306
+ if (fullLength > max) {
307
+ result = i > 0 ? errors.slice(0, i) : [];
308
+ const overLimit = fullLength - max + 1;
309
+ const error = errors[i++];
310
+ result.push({
311
+ ...error,
312
+ details: error.details.split("\n").slice(0, -overLimit).join("\n"),
313
+ filteredDetails: overLimit
314
+ });
315
+ filtered = errors.length - i;
316
+ for (; i < errors.length; i++) {
317
+ const error = errors[i];
318
+ if (typeof error === "string" || !error.details)
319
+ result.push(error);
320
+ result.push({ ...error, details: "" });
321
+ }
322
+ break;
323
+ }
324
+ if (fullLength === max) {
325
+ result = errors.slice(0, ++i);
326
+ filtered = errors.length - i;
327
+ for (; i < errors.length; i++) {
328
+ const error = errors[i];
329
+ if (typeof error === "string" || !error.details)
330
+ result.push(error);
331
+ result.push({ ...error, details: "" });
332
+ }
333
+ break;
334
+ }
335
+ }
336
+ }
337
+ return {
338
+ errors: result,
339
+ filtered
340
+ };
341
+ };
342
+ exports.errorsSpaceLimit = errorsSpaceLimit;
package/dist/util/fs.d.ts CHANGED
@@ -9,6 +9,8 @@
9
9
  */
10
10
  /// <reference types="node" />
11
11
  /// <reference types="node" />
12
+ /// <reference types="node" />
13
+ import type { Abortable } from "node:events";
12
14
  import type { WatchOptions } from "../config";
13
15
  export interface Watcher {
14
16
  close(): void;
@@ -25,7 +27,7 @@ export interface WatcherInfo {
25
27
  fileTimeInfoEntries: Map<string, FileSystemInfoEntry | "ignore">;
26
28
  contextTimeInfoEntries: Map<string, FileSystemInfoEntry | "ignore">;
27
29
  }
28
- interface IDirent {
30
+ export type IStatsBase<T> = {
29
31
  isFile: () => boolean;
30
32
  isDirectory: () => boolean;
31
33
  isBlockDevice: () => boolean;
@@ -33,9 +35,33 @@ interface IDirent {
33
35
  isSymbolicLink: () => boolean;
34
36
  isFIFO: () => boolean;
35
37
  isSocket: () => boolean;
36
- name: string | Buffer;
37
- }
38
- interface IStats {
38
+ dev: T;
39
+ ino: T;
40
+ mode: T;
41
+ nlink: T;
42
+ uid: T;
43
+ gid: T;
44
+ rdev: T;
45
+ size: T;
46
+ blksize: T;
47
+ blocks: T;
48
+ atimeMs: T;
49
+ mtimeMs: T;
50
+ ctimeMs: T;
51
+ birthtimeMs: T;
52
+ atime: Date;
53
+ mtime: Date;
54
+ ctime: Date;
55
+ birthtime: Date;
56
+ };
57
+ export type IStats = IStatsBase<number>;
58
+ export type IBigIntStats = IStatsBase<bigint> & {
59
+ atimeNs: bigint;
60
+ mtimeNs: bigint;
61
+ ctimeNs: bigint;
62
+ birthtimeNs: bigint;
63
+ };
64
+ interface IDirent {
39
65
  isFile: () => boolean;
40
66
  isDirectory: () => boolean;
41
67
  isBlockDevice: () => boolean;
@@ -43,24 +69,7 @@ interface IStats {
43
69
  isSymbolicLink: () => boolean;
44
70
  isFIFO: () => boolean;
45
71
  isSocket: () => boolean;
46
- dev: number | bigint;
47
- ino: number | bigint;
48
- mode: number | bigint;
49
- nlink: number | bigint;
50
- uid: number | bigint;
51
- gid: number | bigint;
52
- rdev: number | bigint;
53
- size: number | bigint;
54
- blksize: number | bigint;
55
- blocks: number | bigint;
56
- atimeMs: number | bigint;
57
- mtimeMs: number | bigint;
58
- ctimeMs: number | bigint;
59
- birthtimeMs: number | bigint;
60
- atime: Date;
61
- mtime: Date;
62
- ctime: Date;
63
- birthtime: Date;
72
+ name: string | Buffer;
64
73
  }
65
74
  export interface OutputFileSystem {
66
75
  writeFile: (arg0: string, arg1: string | Buffer, arg2: (arg0?: null | NodeJS.ErrnoException) => void) => void;
@@ -75,6 +84,220 @@ export interface OutputFileSystem {
75
84
  relative?: (arg0: string, arg1: string) => string;
76
85
  dirname?: (arg0: string) => string;
77
86
  }
87
+ export type JsonPrimitive = string | number | boolean | null;
88
+ export type JsonArray = JsonValue[];
89
+ export type JsonValue = JsonPrimitive | JsonObject | JsonArray;
90
+ export type JsonObject = {
91
+ [Key in string]: JsonValue;
92
+ } & {
93
+ [Key in string]?: JsonValue | undefined;
94
+ };
95
+ export type NoParamCallback = (err: NodeJS.ErrnoException | null) => void;
96
+ export type StringCallback = (err: NodeJS.ErrnoException | null, data?: string) => void;
97
+ export type BufferCallback = (err: NodeJS.ErrnoException | null, data?: Buffer) => void;
98
+ export type StringOrBufferCallback = (err: NodeJS.ErrnoException | null, data?: string | Buffer) => void;
99
+ export type ReaddirStringCallback = (err: NodeJS.ErrnoException | null, files?: string[]) => void;
100
+ export type ReaddirBufferCallback = (err: NodeJS.ErrnoException | null, files?: Buffer[]) => void;
101
+ export type ReaddirStringOrBufferCallback = (err: NodeJS.ErrnoException | null, files?: string[] | Buffer[]) => void;
102
+ export type ReaddirDirentCallback = (err: NodeJS.ErrnoException | null, files?: IDirent[]) => void;
103
+ export type StatsCallback = (err: NodeJS.ErrnoException | null, stats?: IStats) => void;
104
+ export type BigIntStatsCallback = (err: NodeJS.ErrnoException | null, stats?: IBigIntStats) => void;
105
+ export type StatsOrBigIntStatsCallback = (err: NodeJS.ErrnoException | null, stats?: IStats | IBigIntStats) => void;
106
+ export type NumberCallback = (err: NodeJS.ErrnoException | null, data?: number) => void;
107
+ export type ReadJsonCallback = (err: NodeJS.ErrnoException | Error | null, data?: JsonObject) => void;
108
+ export type PathLike = string | Buffer | URL;
109
+ export type PathOrFileDescriptor = PathLike | number;
110
+ export type ObjectEncodingOptions = {
111
+ encoding?: BufferEncoding | null;
112
+ };
113
+ export type ReadFile = {
114
+ (path: PathOrFileDescriptor, options: ({
115
+ encoding: null | undefined;
116
+ flag?: string;
117
+ } & Abortable) | null | undefined, callback: BufferCallback): void;
118
+ (path: PathOrFileDescriptor, options: ({
119
+ encoding: BufferEncoding;
120
+ flag?: string;
121
+ } & Abortable) | BufferEncoding, callback: StringCallback): void;
122
+ (path: PathOrFileDescriptor, options: (ObjectEncodingOptions & {
123
+ flag?: string;
124
+ } & Abortable) | BufferEncoding | null | undefined, callback: StringOrBufferCallback): void;
125
+ (path: PathOrFileDescriptor, callback: BufferCallback): void;
126
+ };
127
+ export type ReadFileSync = {
128
+ (path: PathOrFileDescriptor, options: {
129
+ encoding: null | undefined;
130
+ flag?: string;
131
+ } | null): Buffer;
132
+ (path: PathOrFileDescriptor, options: {
133
+ encoding: BufferEncoding;
134
+ flag?: string;
135
+ } | BufferEncoding): string;
136
+ (path: PathOrFileDescriptor, options: (ObjectEncodingOptions & {
137
+ flag?: string;
138
+ }) | BufferEncoding | null): string | Buffer;
139
+ };
140
+ export type EncodingOption = ObjectEncodingOptions | BufferEncoding | undefined | null;
141
+ export type BufferEncodingOption = "buffer" | {
142
+ encoding: "buffer";
143
+ };
144
+ export type StatOptions = {
145
+ bigint?: boolean;
146
+ };
147
+ export type StatSyncOptions = {
148
+ bigint?: boolean;
149
+ throwIfNoEntry?: boolean;
150
+ };
151
+ export type Readlink = {
152
+ (path: PathLike, options: EncodingOption, callback: StringCallback): void;
153
+ (path: PathLike, options: BufferEncodingOption, callback: BufferCallback): void;
154
+ (path: PathLike, options: EncodingOption, callback: StringOrBufferCallback): void;
155
+ (path: PathLike, callback: StringCallback): void;
156
+ };
157
+ export type ReadlinkSync = {
158
+ (path: PathLike, options: EncodingOption): string;
159
+ (path: PathLike, options: BufferEncodingOption): Buffer;
160
+ (path: PathLike, options: EncodingOption): string | Buffer;
161
+ };
162
+ export type Readdir = {
163
+ (path: PathLike, options: {
164
+ encoding: BufferEncoding | null;
165
+ withFileTypes?: false;
166
+ recursive?: boolean;
167
+ } | BufferEncoding | null | undefined, callback: ReaddirStringCallback): void;
168
+ (path: PathLike, options: {
169
+ encoding: "buffer";
170
+ withFileTypes?: false;
171
+ recursive?: boolean;
172
+ } | "buffer", callback: ReaddirBufferCallback): void;
173
+ (path: PathLike, callback: ReaddirStringCallback): void;
174
+ (path: PathLike, options: (ObjectEncodingOptions & {
175
+ withFileTypes: true;
176
+ recursive?: boolean;
177
+ }) | BufferEncoding | null | undefined, callback: ReaddirStringOrBufferCallback): void;
178
+ (path: PathLike, options: ObjectEncodingOptions & {
179
+ withFileTypes: true;
180
+ recursive?: boolean;
181
+ }, callback: ReaddirDirentCallback): void;
182
+ };
183
+ export type ReaddirSync = {
184
+ (path: PathLike, options: {
185
+ encoding: BufferEncoding | null;
186
+ withFileTypes?: false;
187
+ recursive?: boolean;
188
+ } | BufferEncoding | null): string[];
189
+ (path: PathLike, options: {
190
+ encoding: "buffer";
191
+ withFileTypes?: false;
192
+ recursive?: boolean;
193
+ } | "buffer"): Buffer[];
194
+ (path: PathLike, options: (ObjectEncodingOptions & {
195
+ withFileTypes?: false;
196
+ recursive?: boolean;
197
+ }) | BufferEncoding | null): string[] | Buffer[];
198
+ (path: PathLike, options: ObjectEncodingOptions & {
199
+ withFileTypes: true;
200
+ recursive?: boolean;
201
+ }): IDirent[];
202
+ };
203
+ export type Stat = {
204
+ (path: PathLike, callback: StatsCallback): void;
205
+ (path: PathLike, options: (StatOptions & {
206
+ bigint?: false;
207
+ }) | undefined, callback: StatsCallback): void;
208
+ (path: PathLike, options: StatOptions & {
209
+ bigint: true;
210
+ }, callback: BigIntStatsCallback): void;
211
+ (path: PathLike, options: StatOptions | undefined, callback: StatsOrBigIntStatsCallback): void;
212
+ };
213
+ export type StatSync = {
214
+ (path: PathLike, options?: undefined): IStats;
215
+ (path: PathLike, options?: StatSyncOptions & {
216
+ bigint?: false;
217
+ throwIfNoEntry: false;
218
+ }): IStats | undefined;
219
+ (path: PathLike, options: StatSyncOptions & {
220
+ bigint: true;
221
+ throwIfNoEntry: false;
222
+ }): IBigIntStats | undefined;
223
+ (path: PathLike, options?: StatSyncOptions & {
224
+ bigint?: false;
225
+ }): IStats;
226
+ (path: PathLike, options: StatSyncOptions & {
227
+ bigint: true;
228
+ }): IBigIntStats;
229
+ (path: PathLike, options: StatSyncOptions & {
230
+ bigint: boolean;
231
+ throwIfNoEntry?: false;
232
+ }): IStats | IBigIntStats;
233
+ (path: PathLike, options?: StatSyncOptions): IStats | IBigIntStats | undefined;
234
+ };
235
+ export type LStat = {
236
+ (path: PathLike, callback: StatsCallback): void;
237
+ (path: PathLike, options: (StatOptions & {
238
+ bigint?: false;
239
+ }) | undefined, callback: StatsCallback): void;
240
+ (path: PathLike, options: StatOptions & {
241
+ bigint: true;
242
+ }, callback: BigIntStatsCallback): void;
243
+ (path: PathLike, options: StatOptions | undefined, callback: StatsOrBigIntStatsCallback): void;
244
+ };
245
+ export type LStatSync = {
246
+ (path: PathLike, options?: undefined): IStats;
247
+ (path: PathLike, options?: StatSyncOptions & {
248
+ bigint?: false;
249
+ throwIfNoEntry: false;
250
+ }): IStats | undefined;
251
+ (path: PathLike, options: StatSyncOptions & {
252
+ bigint: true;
253
+ throwIfNoEntry: false;
254
+ }): IBigIntStats | undefined;
255
+ (path: PathLike, options?: StatSyncOptions & {
256
+ bigint?: false;
257
+ }): IStats;
258
+ (path: PathLike, options: StatSyncOptions & {
259
+ bigint: true;
260
+ }): IBigIntStats;
261
+ (path: PathLike, options: StatSyncOptions & {
262
+ bigint: boolean;
263
+ throwIfNoEntry?: false;
264
+ }): IStats | IBigIntStats;
265
+ (path: PathLike, options?: StatSyncOptions): IStats | IBigIntStats | undefined;
266
+ };
267
+ export type RealPath = {
268
+ (path: PathLike, options: EncodingOption, callback: StringCallback): void;
269
+ (path: PathLike, options: BufferEncodingOption, callback: BufferCallback): void;
270
+ (path: PathLike, options: EncodingOption, callback: StringOrBufferCallback): void;
271
+ (path: PathLike, callback: StringCallback): void;
272
+ };
273
+ export type RealPathSync = {
274
+ (path: PathLike, options?: EncodingOption): string;
275
+ (path: PathLike, options: BufferEncodingOption): Buffer;
276
+ (path: PathLike, options?: EncodingOption): string | Buffer;
277
+ };
278
+ export type ReadJson = (path: PathOrFileDescriptor, callback: ReadJsonCallback) => void;
279
+ export type ReadJsonSync = (path: PathOrFileDescriptor) => JsonObject;
280
+ export type Purge = (files?: string | string[] | Set<string>) => void;
281
+ export type InputFileSystem = {
282
+ readFile: ReadFile;
283
+ readFileSync?: ReadFileSync;
284
+ readlink: Readlink;
285
+ readlinkSync?: ReadlinkSync;
286
+ readdir: Readdir;
287
+ readdirSync?: ReaddirSync;
288
+ stat: Stat;
289
+ statSync?: StatSync;
290
+ lstat?: LStat;
291
+ lstatSync?: LStatSync;
292
+ realpath?: RealPath;
293
+ realpathSync?: RealPathSync;
294
+ readJson?: ReadJson;
295
+ readJsonSync?: ReadJsonSync;
296
+ purge?: Purge;
297
+ join?: (path1: string, path2: string) => string;
298
+ relative?: (from: string, to: string) => string;
299
+ dirname?: (path: string) => string;
300
+ };
78
301
  export declare function rmrf(fs: OutputFileSystem, p: string, callback: (err?: Error | null) => void): void;
79
302
  export declare const mkdirp: (fs: OutputFileSystem, p: string, callback: (error?: Error) => void) => void;
80
303
  export interface FileSystemInfoEntry {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/core",
3
- "version": "1.0.0-beta.3",
3
+ "version": "1.0.0-beta.5",
4
4
  "webpackVersion": "5.75.0",
5
5
  "license": "MIT",
6
6
  "description": "The fast Rust-based web bundler with webpack-compatible API",
@@ -58,9 +58,9 @@
58
58
  },
59
59
  "dependencies": {
60
60
  "@module-federation/runtime-tools": "0.2.3",
61
+ "@rspack/lite-tapable": "1.0.0",
61
62
  "caniuse-lite": "^1.0.30001616",
62
- "@rspack/binding": "1.0.0-beta.3",
63
- "@rspack/lite-tapable": "1.0.0-beta.3"
63
+ "@rspack/binding": "1.0.0-beta.5"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "@swc/helpers": ">=0.5.1"
@@ -1,16 +0,0 @@
1
- import { BuiltinPluginName } from "@rspack/binding";
2
- import type { AssetConditions } from "../util/assetCondition";
3
- export type SwcCssMinimizerRspackPluginOptions = {
4
- test?: AssetConditions;
5
- exclude?: AssetConditions;
6
- include?: AssetConditions;
7
- };
8
- export declare const SwcCssMinimizerRspackPlugin: {
9
- new (options?: SwcCssMinimizerRspackPluginOptions | undefined): {
10
- name: BuiltinPluginName;
11
- _args: [options?: SwcCssMinimizerRspackPluginOptions | undefined];
12
- affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
13
- raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
14
- apply(compiler: import("../Compiler").Compiler): void;
15
- };
16
- };
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SwcCssMinimizerRspackPlugin = void 0;
4
- const binding_1 = require("@rspack/binding");
5
- const base_1 = require("./base");
6
- exports.SwcCssMinimizerRspackPlugin = (0, base_1.create)(binding_1.BuiltinPluginName.SwcCssMinimizerRspackPlugin, (options) => {
7
- return {
8
- test: options?.test,
9
- include: options?.include,
10
- exclude: options?.exclude
11
- };
12
- });