@rspack/core 0.6.3 → 0.6.4-canary-010ffa6-20240507093348
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.
- package/dist/Compilation.d.ts +3 -26
- package/dist/Compilation.js +165 -52
- package/dist/Compiler.js +15 -13
- package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +11 -0
- package/dist/builtin-plugin/DynamicEntryPlugin.js +25 -0
- package/dist/builtin-plugin/EntryPlugin.d.ts +2 -1
- package/dist/builtin-plugin/EntryPlugin.js +3 -2
- package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +11 -0
- package/dist/builtin-plugin/RuntimeChunkPlugin.js +6 -0
- package/dist/builtin-plugin/css-extract/index.js +1 -3
- package/dist/builtin-plugin/index.d.ts +2 -0
- package/dist/builtin-plugin/index.js +2 -0
- package/dist/config/adapter.d.ts +1 -2
- package/dist/config/adapter.js +24 -7
- package/dist/config/defaults.js +44 -10
- package/dist/config/normalization.d.ts +6 -2
- package/dist/config/normalization.js +12 -8
- package/dist/config/zod.d.ts +725 -15
- package/dist/config/zod.js +15 -3
- package/dist/container/ContainerPlugin.js +1 -2
- package/dist/container/ModuleFederationPluginV1.js +2 -0
- package/dist/exports.d.ts +5 -0
- package/dist/exports.js +24 -21
- package/dist/lib/EntryOptionPlugin.js +1 -3
- package/dist/rspackOptionsApply.js +1 -5
- package/hot/emitter.js +20 -1
- package/package.json +4 -6
package/dist/config/zod.js
CHANGED
|
@@ -118,6 +118,7 @@ const entry = entryStatic.or(zod_1.z.function().returns(entryStatic));
|
|
|
118
118
|
//#endregion
|
|
119
119
|
//#region Output
|
|
120
120
|
const path = zod_1.z.string();
|
|
121
|
+
const pathinfo = zod_1.z.boolean().or(zod_1.z.literal("verbose"));
|
|
121
122
|
const assetModuleFilename = zod_1.z.string();
|
|
122
123
|
const webassemblyModuleFilename = zod_1.z.string();
|
|
123
124
|
const chunkFilename = filename;
|
|
@@ -159,6 +160,7 @@ const devtoolModuleFilenameTemplate = zod_1.z.union([
|
|
|
159
160
|
const devtoolFallbackModuleFilenameTemplate = devtoolModuleFilenameTemplate;
|
|
160
161
|
const output = zod_1.z.strictObject({
|
|
161
162
|
path: path.optional(),
|
|
163
|
+
pathinfo: pathinfo.optional(),
|
|
162
164
|
clean: clean.optional(),
|
|
163
165
|
publicPath: publicPath.optional(),
|
|
164
166
|
filename: filename.optional(),
|
|
@@ -328,18 +330,25 @@ const dynamicImportMode = zod_1.z.enum(["eager", "lazy"]);
|
|
|
328
330
|
const dynamicImportPreload = zod_1.z.union([zod_1.z.boolean(), zod_1.z.number()]);
|
|
329
331
|
const dynamicImportPrefetch = zod_1.z.union([zod_1.z.boolean(), zod_1.z.number()]);
|
|
330
332
|
const javascriptParserUrl = zod_1.z.union([zod_1.z.literal("relative"), zod_1.z.boolean()]);
|
|
333
|
+
const exprContextCritical = zod_1.z.boolean();
|
|
334
|
+
const wrappedContextCritical = zod_1.z.boolean();
|
|
331
335
|
const javascriptParserOptions = zod_1.z.strictObject({
|
|
332
336
|
dynamicImportMode: dynamicImportMode.optional(),
|
|
333
337
|
dynamicImportPreload: dynamicImportPreload.optional(),
|
|
334
338
|
dynamicImportPrefetch: dynamicImportPrefetch.optional(),
|
|
335
|
-
url: javascriptParserUrl.optional()
|
|
339
|
+
url: javascriptParserUrl.optional(),
|
|
340
|
+
exprContextCritical: exprContextCritical.optional(),
|
|
341
|
+
wrappedContextCritical: wrappedContextCritical.optional()
|
|
336
342
|
});
|
|
337
343
|
const parserOptionsByModuleTypeKnown = zod_1.z.strictObject({
|
|
338
344
|
asset: assetParserOptions.optional(),
|
|
339
345
|
css: cssParserOptions.optional(),
|
|
340
346
|
"css/auto": cssAutoParserOptions.optional(),
|
|
341
347
|
"css/module": cssModuleParserOptions.optional(),
|
|
342
|
-
javascript: javascriptParserOptions.optional()
|
|
348
|
+
javascript: javascriptParserOptions.optional(),
|
|
349
|
+
"javascript/auto": javascriptParserOptions.optional(),
|
|
350
|
+
"javascript/dynamic": javascriptParserOptions.optional(),
|
|
351
|
+
"javascript/esm": javascriptParserOptions.optional()
|
|
343
352
|
});
|
|
344
353
|
const parserOptionsByModuleTypeUnknown = zod_1.z.record(zod_1.z.record(zod_1.z.any()));
|
|
345
354
|
const parserOptionsByModuleType = parserOptionsByModuleTypeKnown.or(parserOptionsByModuleTypeUnknown);
|
|
@@ -648,7 +657,10 @@ const optimizationRuntimeChunk = zod_1.z
|
|
|
648
657
|
.or(zod_1.z.strictObject({
|
|
649
658
|
name: zod_1.z
|
|
650
659
|
.string()
|
|
651
|
-
.or(zod_1.z
|
|
660
|
+
.or(zod_1.z
|
|
661
|
+
.function()
|
|
662
|
+
.args(zod_1.z.strictObject({ name: zod_1.z.string() }))
|
|
663
|
+
.returns(zod_1.z.string()))
|
|
652
664
|
.optional()
|
|
653
665
|
}));
|
|
654
666
|
const optimizationSplitChunksNameFunction = zod_1.z.function().args(zod_1.z.instanceof(Module_1.Module).optional()
|
|
@@ -4,7 +4,6 @@ exports.ContainerPlugin = void 0;
|
|
|
4
4
|
const binding_1 = require("@rspack/binding");
|
|
5
5
|
const base_1 = require("../builtin-plugin/base");
|
|
6
6
|
const config_1 = require("../config");
|
|
7
|
-
const util_1 = require("../util");
|
|
8
7
|
const options_1 = require("../container/options");
|
|
9
8
|
const ShareRuntimePlugin_1 = require("../sharing/ShareRuntimePlugin");
|
|
10
9
|
class ContainerPlugin extends base_1.RspackBuiltinPlugin {
|
|
@@ -41,7 +40,7 @@ class ContainerPlugin extends base_1.RspackBuiltinPlugin {
|
|
|
41
40
|
name,
|
|
42
41
|
shareScope,
|
|
43
42
|
library: (0, config_1.getRawLibrary)(library),
|
|
44
|
-
runtime
|
|
43
|
+
runtime,
|
|
45
44
|
filename,
|
|
46
45
|
exposes: exposes.map(([key, r]) => ({ key, ...r })),
|
|
47
46
|
enhanced
|
|
@@ -6,6 +6,7 @@ const SharePlugin_1 = require("../sharing/SharePlugin");
|
|
|
6
6
|
const validate_1 = require("../util/validate");
|
|
7
7
|
const ContainerPlugin_1 = require("./ContainerPlugin");
|
|
8
8
|
const ContainerReferencePlugin_1 = require("./ContainerReferencePlugin");
|
|
9
|
+
const ShareRuntimePlugin_1 = require("../sharing/ShareRuntimePlugin");
|
|
9
10
|
class ModuleFederationPluginV1 {
|
|
10
11
|
constructor(_options) {
|
|
11
12
|
this._options = _options;
|
|
@@ -24,6 +25,7 @@ class ModuleFederationPluginV1 {
|
|
|
24
25
|
compiler.options.output.enabledLibraryTypes.push(library.type);
|
|
25
26
|
}
|
|
26
27
|
compiler.hooks.afterPlugins.tap("ModuleFederationPlugin", () => {
|
|
28
|
+
new ShareRuntimePlugin_1.ShareRuntimePlugin(this._options.enhanced).apply(compiler);
|
|
27
29
|
if (options.exposes &&
|
|
28
30
|
(Array.isArray(options.exposes)
|
|
29
31
|
? options.exposes.length > 0
|
package/dist/exports.d.ts
CHANGED
|
@@ -11,8 +11,10 @@ export { RuntimeGlobals } from "./RuntimeGlobals";
|
|
|
11
11
|
export { Stats } from "./Stats";
|
|
12
12
|
export type { StatsCompilation, StatsAsset, StatsChunk, StatsError, StatsModule, StatsWarnings } from "./Stats";
|
|
13
13
|
export { MultiStats } from "./MultiStats";
|
|
14
|
+
export type { Chunk } from "./Chunk";
|
|
14
15
|
export type { ChunkGroup } from "./ChunkGroup";
|
|
15
16
|
export type { NormalModuleFactory } from "./NormalModuleFactory";
|
|
17
|
+
export type { Module } from "./Module";
|
|
16
18
|
export { NormalModule } from "./NormalModule";
|
|
17
19
|
import * as ModuleFilenameHelpers from "./lib/ModuleFilenameHelpers";
|
|
18
20
|
export { ModuleFilenameHelpers };
|
|
@@ -48,6 +50,7 @@ export { ProgressPlugin } from "./builtin-plugin";
|
|
|
48
50
|
export type { ProgressPluginArgument } from "./builtin-plugin";
|
|
49
51
|
export { EntryPlugin } from "./builtin-plugin";
|
|
50
52
|
export type { EntryOptions } from "./builtin-plugin";
|
|
53
|
+
export { DynamicEntryPlugin } from "./builtin-plugin";
|
|
51
54
|
export { ExternalsPlugin } from "./builtin-plugin";
|
|
52
55
|
export { HotModuleReplacementPlugin } from "./builtin-plugin";
|
|
53
56
|
export { LoaderOptionsPlugin } from "./lib/LoaderOptionsPlugin";
|
|
@@ -87,8 +90,10 @@ interface Webworker {
|
|
|
87
90
|
}
|
|
88
91
|
export declare const webworker: Webworker;
|
|
89
92
|
import { LimitChunkCountPlugin } from "./builtin-plugin";
|
|
93
|
+
import { RuntimeChunkPlugin } from "./builtin-plugin";
|
|
90
94
|
interface Optimize {
|
|
91
95
|
LimitChunkCountPlugin: typeof LimitChunkCountPlugin;
|
|
96
|
+
RuntimeChunkPlugin: typeof RuntimeChunkPlugin;
|
|
92
97
|
}
|
|
93
98
|
export declare const optimize: Optimize;
|
|
94
99
|
import { ModuleFederationPlugin } from "./container/ModuleFederationPlugin";
|
package/dist/exports.js
CHANGED
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.CssExtractRspackPlugin = 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.IgnorePlugin = 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;
|
|
29
|
+
exports.CssExtractRspackPlugin = 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.DynamicEntryPlugin = exports.EntryPlugin = exports.ProgressPlugin = exports.DefinePlugin = exports.ProvidePlugin = exports.IgnorePlugin = 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;
|
|
30
30
|
const { version: rspackVersion, webpackVersion } = require("../package.json");
|
|
31
31
|
exports.rspackVersion = rspackVersion;
|
|
32
32
|
exports.version = webpackVersion;
|
|
@@ -85,9 +85,11 @@ Object.defineProperty(exports, "ProgressPlugin", { enumerable: true, get: functi
|
|
|
85
85
|
var builtin_plugin_6 = require("./builtin-plugin");
|
|
86
86
|
Object.defineProperty(exports, "EntryPlugin", { enumerable: true, get: function () { return builtin_plugin_6.EntryPlugin; } });
|
|
87
87
|
var builtin_plugin_7 = require("./builtin-plugin");
|
|
88
|
-
Object.defineProperty(exports, "
|
|
88
|
+
Object.defineProperty(exports, "DynamicEntryPlugin", { enumerable: true, get: function () { return builtin_plugin_7.DynamicEntryPlugin; } });
|
|
89
89
|
var builtin_plugin_8 = require("./builtin-plugin");
|
|
90
|
-
Object.defineProperty(exports, "
|
|
90
|
+
Object.defineProperty(exports, "ExternalsPlugin", { enumerable: true, get: function () { return builtin_plugin_8.ExternalsPlugin; } });
|
|
91
|
+
var builtin_plugin_9 = require("./builtin-plugin");
|
|
92
|
+
Object.defineProperty(exports, "HotModuleReplacementPlugin", { enumerable: true, get: function () { return builtin_plugin_9.HotModuleReplacementPlugin; } });
|
|
91
93
|
var LoaderOptionsPlugin_1 = require("./lib/LoaderOptionsPlugin");
|
|
92
94
|
Object.defineProperty(exports, "LoaderOptionsPlugin", { enumerable: true, get: function () { return LoaderOptionsPlugin_1.LoaderOptionsPlugin; } });
|
|
93
95
|
var LoaderTargetPlugin_1 = require("./lib/LoaderTargetPlugin");
|
|
@@ -97,20 +99,21 @@ Object.defineProperty(exports, "EnvironmentPlugin", { enumerable: true, get: fun
|
|
|
97
99
|
var NormalModuleReplacementPlugin_1 = require("./lib/NormalModuleReplacementPlugin");
|
|
98
100
|
Object.defineProperty(exports, "NormalModuleReplacementPlugin", { enumerable: true, get: function () { return NormalModuleReplacementPlugin_1.NormalModuleReplacementPlugin; } });
|
|
99
101
|
const NodeTemplatePlugin_1 = __importDefault(require("./node/NodeTemplatePlugin"));
|
|
100
|
-
const builtin_plugin_9 = require("./builtin-plugin");
|
|
101
|
-
exports.node = { NodeTargetPlugin: builtin_plugin_9.NodeTargetPlugin, NodeTemplatePlugin: NodeTemplatePlugin_1.default };
|
|
102
102
|
const builtin_plugin_10 = require("./builtin-plugin");
|
|
103
|
-
exports.
|
|
103
|
+
exports.node = { NodeTargetPlugin: builtin_plugin_10.NodeTargetPlugin, NodeTemplatePlugin: NodeTemplatePlugin_1.default };
|
|
104
104
|
const builtin_plugin_11 = require("./builtin-plugin");
|
|
105
|
-
exports.
|
|
105
|
+
exports.electron = { ElectronTargetPlugin: builtin_plugin_11.ElectronTargetPlugin };
|
|
106
106
|
const builtin_plugin_12 = require("./builtin-plugin");
|
|
107
|
-
exports.
|
|
107
|
+
exports.library = { EnableLibraryPlugin: builtin_plugin_12.EnableLibraryPlugin };
|
|
108
108
|
const builtin_plugin_13 = require("./builtin-plugin");
|
|
109
|
-
exports.
|
|
109
|
+
exports.wasm = { EnableWasmLoadingPlugin: builtin_plugin_13.EnableWasmLoadingPlugin };
|
|
110
110
|
const builtin_plugin_14 = require("./builtin-plugin");
|
|
111
|
-
exports.
|
|
111
|
+
exports.javascript = { EnableChunkLoadingPlugin: builtin_plugin_14.EnableChunkLoadingPlugin };
|
|
112
112
|
const builtin_plugin_15 = require("./builtin-plugin");
|
|
113
|
-
exports.
|
|
113
|
+
exports.webworker = { WebWorkerTemplatePlugin: builtin_plugin_15.WebWorkerTemplatePlugin };
|
|
114
|
+
const builtin_plugin_16 = require("./builtin-plugin");
|
|
115
|
+
const builtin_plugin_17 = require("./builtin-plugin");
|
|
116
|
+
exports.optimize = { LimitChunkCountPlugin: builtin_plugin_16.LimitChunkCountPlugin, RuntimeChunkPlugin: builtin_plugin_17.RuntimeChunkPlugin };
|
|
114
117
|
const ModuleFederationPlugin_1 = require("./container/ModuleFederationPlugin");
|
|
115
118
|
const ModuleFederationPluginV1_1 = require("./container/ModuleFederationPluginV1");
|
|
116
119
|
const ContainerPlugin_1 = require("./container/ContainerPlugin");
|
|
@@ -130,19 +133,19 @@ exports.sharing = {
|
|
|
130
133
|
SharePlugin: SharePlugin_1.SharePlugin
|
|
131
134
|
};
|
|
132
135
|
///// Rspack Postfixed Internal Plugins /////
|
|
133
|
-
var builtin_plugin_16 = require("./builtin-plugin");
|
|
134
|
-
Object.defineProperty(exports, "HtmlRspackPlugin", { enumerable: true, get: function () { return builtin_plugin_16.HtmlRspackPlugin; } });
|
|
135
|
-
var builtin_plugin_17 = require("./builtin-plugin");
|
|
136
|
-
Object.defineProperty(exports, "SwcJsMinimizerRspackPlugin", { enumerable: true, get: function () { return builtin_plugin_17.SwcJsMinimizerRspackPlugin; } });
|
|
137
136
|
var builtin_plugin_18 = require("./builtin-plugin");
|
|
138
|
-
Object.defineProperty(exports, "
|
|
137
|
+
Object.defineProperty(exports, "HtmlRspackPlugin", { enumerable: true, get: function () { return builtin_plugin_18.HtmlRspackPlugin; } });
|
|
139
138
|
var builtin_plugin_19 = require("./builtin-plugin");
|
|
140
|
-
Object.defineProperty(exports, "
|
|
139
|
+
Object.defineProperty(exports, "SwcJsMinimizerRspackPlugin", { enumerable: true, get: function () { return builtin_plugin_19.SwcJsMinimizerRspackPlugin; } });
|
|
141
140
|
var builtin_plugin_20 = require("./builtin-plugin");
|
|
142
|
-
Object.defineProperty(exports, "
|
|
141
|
+
Object.defineProperty(exports, "SwcCssMinimizerRspackPlugin", { enumerable: true, get: function () { return builtin_plugin_20.SwcCssMinimizerRspackPlugin; } });
|
|
143
142
|
var builtin_plugin_21 = require("./builtin-plugin");
|
|
144
|
-
Object.defineProperty(exports, "
|
|
143
|
+
Object.defineProperty(exports, "CopyRspackPlugin", { enumerable: true, get: function () { return builtin_plugin_21.CopyRspackPlugin; } });
|
|
145
144
|
var builtin_plugin_22 = require("./builtin-plugin");
|
|
146
|
-
Object.defineProperty(exports, "
|
|
145
|
+
Object.defineProperty(exports, "SourceMapDevToolPlugin", { enumerable: true, get: function () { return builtin_plugin_22.SourceMapDevToolPlugin; } });
|
|
147
146
|
var builtin_plugin_23 = require("./builtin-plugin");
|
|
148
|
-
Object.defineProperty(exports, "
|
|
147
|
+
Object.defineProperty(exports, "EvalSourceMapDevToolPlugin", { enumerable: true, get: function () { return builtin_plugin_23.EvalSourceMapDevToolPlugin; } });
|
|
148
|
+
var builtin_plugin_24 = require("./builtin-plugin");
|
|
149
|
+
Object.defineProperty(exports, "EvalDevToolModulePlugin", { enumerable: true, get: function () { return builtin_plugin_24.EvalDevToolModulePlugin; } });
|
|
150
|
+
var builtin_plugin_25 = require("./builtin-plugin");
|
|
151
|
+
Object.defineProperty(exports, "CssExtractRspackPlugin", { enumerable: true, get: function () { return builtin_plugin_25.CssExtractRspackPlugin; } });
|
|
@@ -22,10 +22,8 @@ class EntryOptionPlugin {
|
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
static applyEntryOption(compiler, context, entry) {
|
|
25
|
-
// TODO: dynamic entry is not supported yet
|
|
26
25
|
if (typeof entry === "function") {
|
|
27
|
-
|
|
28
|
-
// new DynamicEntryPlugin(context, entry).apply(compiler);
|
|
26
|
+
new builtin_plugin_1.DynamicEntryPlugin(context, entry).apply(compiler);
|
|
29
27
|
}
|
|
30
28
|
else {
|
|
31
29
|
for (const name of Object.keys(entry)) {
|
|
@@ -82,11 +82,7 @@ class RspackOptionsApply {
|
|
|
82
82
|
const runtimeChunk = options.optimization
|
|
83
83
|
.runtimeChunk;
|
|
84
84
|
if (runtimeChunk) {
|
|
85
|
-
|
|
86
|
-
if (value.runtime === undefined && !value.dependOn) {
|
|
87
|
-
value.runtime = runtimeChunk.name({ name: entryName });
|
|
88
|
-
}
|
|
89
|
-
});
|
|
85
|
+
new builtin_plugin_1.RuntimeChunkPlugin(runtimeChunk).apply(compiler);
|
|
90
86
|
}
|
|
91
87
|
if (options.devtool) {
|
|
92
88
|
if (options.devtool.includes("source-map")) {
|
package/hot/emitter.js
CHANGED
|
@@ -1,2 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
function EventEmitter() {
|
|
2
|
+
this.events = {};
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
EventEmitter.prototype.on = function (eventName, callback) {
|
|
6
|
+
if (!this.events[eventName]) {
|
|
7
|
+
this.events[eventName] = [];
|
|
8
|
+
}
|
|
9
|
+
this.events[eventName].push(callback);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
EventEmitter.prototype.emit = function (eventName) {
|
|
13
|
+
var args = Array.prototype.slice.call(arguments, 1);
|
|
14
|
+
if (this.events[eventName]) {
|
|
15
|
+
this.events[eventName].forEach(function (callback) {
|
|
16
|
+
callback.apply(null, args);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
2
21
|
module.exports = new EventEmitter();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/core",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4-canary-010ffa6-20240507093348",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "A Fast Rust-based Web Bundler",
|
|
@@ -60,14 +60,13 @@
|
|
|
60
60
|
"styled-components": "^6.0.8",
|
|
61
61
|
"terser": "5.27.2",
|
|
62
62
|
"wast-loader": "^1.11.4",
|
|
63
|
-
"@rspack/plugin-minify": "^0.6.
|
|
64
|
-
"@rspack/core": "0.6.
|
|
63
|
+
"@rspack/plugin-minify": "^0.6.4-canary-010ffa6-20240507093348",
|
|
64
|
+
"@rspack/core": "0.6.4-canary-010ffa6-20240507093348"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@module-federation/runtime-tools": "0.1.6",
|
|
68
68
|
"browserslist": "^4.21.3",
|
|
69
69
|
"enhanced-resolve": "5.12.0",
|
|
70
|
-
"events": "^3.3.0",
|
|
71
70
|
"graceful-fs": "4.2.10",
|
|
72
71
|
"json-parse-even-better-errors": "^3.0.0",
|
|
73
72
|
"neo-async": "2.6.2",
|
|
@@ -76,7 +75,7 @@
|
|
|
76
75
|
"webpack-sources": "3.2.3",
|
|
77
76
|
"zod": "^3.21.4",
|
|
78
77
|
"zod-validation-error": "1.3.1",
|
|
79
|
-
"@rspack/binding": "0.6.
|
|
78
|
+
"@rspack/binding": "0.6.4-canary-010ffa6-20240507093348"
|
|
80
79
|
},
|
|
81
80
|
"peerDependencies": {
|
|
82
81
|
"@swc/helpers": ">=0.5.1"
|
|
@@ -89,7 +88,6 @@
|
|
|
89
88
|
"scripts": {
|
|
90
89
|
"build": "tsc -b ./tsconfig.build.json",
|
|
91
90
|
"dev": "tsc -w",
|
|
92
|
-
"test": "cross-env NO_COLOR=1 node --expose-gc --max-old-space-size=8192 --experimental-vm-modules ../../node_modules/jest-cli/bin/jest --logHeapUsage",
|
|
93
91
|
"api-extractor": "api-extractor run --verbose",
|
|
94
92
|
"api-extractor:ci": "api-extractor run --verbose || diff temp/api.md etc/api.md"
|
|
95
93
|
}
|