@rspack/core 0.6.2-canary-6ed946f-20240423133246 → 0.6.2-canary-d731478-20240425064305
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/builtin-plugin/RSCClientEntryPlugin.d.ts +10 -0
- package/dist/builtin-plugin/RSCClientEntryPlugin.js +6 -0
- package/dist/{container/ModuleFederationRuntimePlugin.d.ts → builtin-plugin/RSCClientReferenceManifestRspackPlugin.d.ts} +1 -1
- package/dist/builtin-plugin/RSCClientReferenceManifestRspackPlugin.js +6 -0
- package/dist/builtin-plugin/RSCServerReferenceManifestRspackPlugin.d.ts +10 -0
- package/dist/builtin-plugin/RSCServerReferenceManifestRspackPlugin.js +6 -0
- package/dist/builtin-plugin/index.d.ts +3 -0
- package/dist/builtin-plugin/index.js +3 -0
- package/dist/container/ModuleFederationPlugin.js +0 -2
- package/dist/container/default.runtime.js +14 -18
- package/dist/exports.d.ts +5 -2
- package/dist/exports.js +9 -25
- package/dist/loader-runner/index.js +3 -3
- package/dist/loader-runner/loadLoader.js +4 -2
- package/package.json +4 -4
- package/dist/container/ModuleFederationRuntimePlugin.js +0 -6
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
export declare const RSCClientEntryPlugin: {
|
|
3
|
+
new (options: any): {
|
|
4
|
+
name: BuiltinPluginName;
|
|
5
|
+
_options: any;
|
|
6
|
+
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;
|
|
7
|
+
raw(): import("@rspack/binding").BuiltinPlugin;
|
|
8
|
+
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
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, options => options, "compilation");
|
|
@@ -0,0 +1,6 @@
|
|
|
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");
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
export declare const RSCServerReferenceManifestRspackPlugin: {
|
|
3
|
+
new (): {
|
|
4
|
+
name: BuiltinPluginName;
|
|
5
|
+
_options: void;
|
|
6
|
+
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;
|
|
7
|
+
raw(): import("@rspack/binding").BuiltinPlugin;
|
|
8
|
+
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RSCServerReferenceManifestRspackPlugin = void 0;
|
|
4
|
+
const binding_1 = require("@rspack/binding");
|
|
5
|
+
const base_1 = require("./base");
|
|
6
|
+
exports.RSCServerReferenceManifestRspackPlugin = (0, base_1.create)(binding_1.BuiltinPluginName.RSCServerReferenceManifestRspackPlugin, () => { }, "compilation");
|
|
@@ -53,6 +53,9 @@ export * from "./HtmlRspackPlugin";
|
|
|
53
53
|
export * from "./CopyRspackPlugin";
|
|
54
54
|
export * from "./SwcJsMinimizerPlugin";
|
|
55
55
|
export * from "./SwcCssMinimizerPlugin";
|
|
56
|
+
export * from "./RSCClientEntryPlugin";
|
|
57
|
+
export * from "./RSCClientReferenceManifestRspackPlugin";
|
|
58
|
+
export * from "./RSCServerReferenceManifestRspackPlugin";
|
|
56
59
|
export * from "./JsLoaderRspackPlugin";
|
|
57
60
|
export * from "./css-extract";
|
|
58
61
|
import { RawBuiltins } from "@rspack/binding";
|
|
@@ -71,6 +71,9 @@ __exportStar(require("./HtmlRspackPlugin"), exports);
|
|
|
71
71
|
__exportStar(require("./CopyRspackPlugin"), exports);
|
|
72
72
|
__exportStar(require("./SwcJsMinimizerPlugin"), exports);
|
|
73
73
|
__exportStar(require("./SwcCssMinimizerPlugin"), exports);
|
|
74
|
+
__exportStar(require("./RSCClientEntryPlugin"), exports);
|
|
75
|
+
__exportStar(require("./RSCClientReferenceManifestRspackPlugin"), exports);
|
|
76
|
+
__exportStar(require("./RSCServerReferenceManifestRspackPlugin"), exports);
|
|
74
77
|
__exportStar(require("./JsLoaderRspackPlugin"), exports);
|
|
75
78
|
__exportStar(require("./css-extract"), exports);
|
|
76
79
|
function resolveTreeShaking(treeShaking, production) {
|
|
@@ -4,7 +4,6 @@ exports.ModuleFederationPlugin = void 0;
|
|
|
4
4
|
const config_1 = require("../config");
|
|
5
5
|
const options_1 = require("./options");
|
|
6
6
|
const validate_1 = require("../util/validate");
|
|
7
|
-
const ModuleFederationRuntimePlugin_1 = require("./ModuleFederationRuntimePlugin");
|
|
8
7
|
class ModuleFederationPlugin {
|
|
9
8
|
constructor(_options) {
|
|
10
9
|
this._options = _options;
|
|
@@ -20,7 +19,6 @@ class ModuleFederationPlugin {
|
|
|
20
19
|
compiler.hooks.afterPlugins.tap(ModuleFederationPlugin.name, () => {
|
|
21
20
|
new webpack.EntryPlugin(compiler.context, getDefaultEntryRuntime(paths, this._options, compiler), { name: undefined }).apply(compiler);
|
|
22
21
|
});
|
|
23
|
-
new ModuleFederationRuntimePlugin_1.ModuleFederationRuntimePlugin().apply(compiler);
|
|
24
22
|
new webpack.container.ModuleFederationPluginV1({
|
|
25
23
|
...this._options,
|
|
26
24
|
enhanced: true
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
var __module_federation_bundler_runtime__, __module_federation_runtime_plugins__, __module_federation_remote_infos__, __module_federation_container_name__;
|
|
4
4
|
module.exports = function () {
|
|
5
5
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
6
|
-
if (
|
|
7
|
-
__webpack_require__.initializeExposesData)
|
|
8
|
-
__webpack_require__.federation) {
|
|
6
|
+
if (__webpack_require__.initializeSharingData ||
|
|
7
|
+
__webpack_require__.initializeExposesData) {
|
|
9
8
|
const override = (obj, key, value) => {
|
|
10
9
|
if (!obj)
|
|
11
10
|
return;
|
|
@@ -37,10 +36,7 @@ module.exports = function () {
|
|
|
37
36
|
const initializeSharingInitPromises = [];
|
|
38
37
|
const initializeSharingInitTokens = [];
|
|
39
38
|
const containerShareScope = (_l = __webpack_require__.initializeExposesData) === null || _l === void 0 ? void 0 : _l.shareScope;
|
|
40
|
-
|
|
41
|
-
__webpack_require__.federation[key] =
|
|
42
|
-
__module_federation_bundler_runtime__[key];
|
|
43
|
-
}
|
|
39
|
+
early(__webpack_require__, "federation", () => __module_federation_bundler_runtime__);
|
|
44
40
|
early(__webpack_require__.federation, "consumesLoadingModuleToHandlerMapping", () => {
|
|
45
41
|
const consumesLoadingModuleToHandlerMapping = {};
|
|
46
42
|
for (let [moduleId, data] of Object.entries(consumesLoadingModuleToConsumeDataMapping)) {
|
|
@@ -110,11 +106,11 @@ module.exports = function () {
|
|
|
110
106
|
}
|
|
111
107
|
return idToRemoteMap;
|
|
112
108
|
});
|
|
113
|
-
override(__webpack_require__, "S",
|
|
114
|
-
if (
|
|
115
|
-
|
|
109
|
+
override(__webpack_require__, "S", __module_federation_bundler_runtime__.bundlerRuntime.S);
|
|
110
|
+
if (__module_federation_bundler_runtime__.attachShareScopeMap) {
|
|
111
|
+
__module_federation_bundler_runtime__.attachShareScopeMap(__webpack_require__);
|
|
116
112
|
}
|
|
117
|
-
override(__webpack_require__.f, "remotes", (chunkId, promises) =>
|
|
113
|
+
override(__webpack_require__.f, "remotes", (chunkId, promises) => __module_federation_bundler_runtime__.bundlerRuntime.remotes({
|
|
118
114
|
chunkId,
|
|
119
115
|
promises,
|
|
120
116
|
chunkMapping: remotesLoadingChunkMapping,
|
|
@@ -124,7 +120,7 @@ module.exports = function () {
|
|
|
124
120
|
.idToRemoteMap,
|
|
125
121
|
webpackRequire: __webpack_require__
|
|
126
122
|
}));
|
|
127
|
-
override(__webpack_require__.f, "consumes", (chunkId, promises) =>
|
|
123
|
+
override(__webpack_require__.f, "consumes", (chunkId, promises) => __module_federation_bundler_runtime__.bundlerRuntime.consumes({
|
|
128
124
|
chunkId,
|
|
129
125
|
promises,
|
|
130
126
|
chunkMapping: consumesLoadingChunkMapping,
|
|
@@ -132,14 +128,14 @@ module.exports = function () {
|
|
|
132
128
|
installedModules: consumesLoadinginstalledModules,
|
|
133
129
|
webpackRequire: __webpack_require__
|
|
134
130
|
}));
|
|
135
|
-
override(__webpack_require__, "I", (name, initScope) =>
|
|
131
|
+
override(__webpack_require__, "I", (name, initScope) => __module_federation_bundler_runtime__.bundlerRuntime.I({
|
|
136
132
|
shareScopeName: name,
|
|
137
133
|
initScope,
|
|
138
134
|
initPromises: initializeSharingInitPromises,
|
|
139
135
|
initTokens: initializeSharingInitTokens,
|
|
140
136
|
webpackRequire: __webpack_require__
|
|
141
137
|
}));
|
|
142
|
-
override(__webpack_require__, "initContainer", (shareScope, initScope, remoteEntryInitOptions) =>
|
|
138
|
+
override(__webpack_require__, "initContainer", (shareScope, initScope, remoteEntryInitOptions) => __module_federation_bundler_runtime__.bundlerRuntime.initContainerEntry({
|
|
143
139
|
shareScope,
|
|
144
140
|
initScope,
|
|
145
141
|
remoteEntryInitOptions,
|
|
@@ -157,14 +153,14 @@ module.exports = function () {
|
|
|
157
153
|
__webpack_require__.R = undefined;
|
|
158
154
|
return getScope;
|
|
159
155
|
});
|
|
160
|
-
|
|
161
|
-
|
|
156
|
+
__module_federation_bundler_runtime__.instance =
|
|
157
|
+
__module_federation_bundler_runtime__.runtime.init(__module_federation_bundler_runtime__.initOptions);
|
|
162
158
|
if ((_m = __webpack_require__.consumesLoadingData) === null || _m === void 0 ? void 0 : _m.initialConsumes) {
|
|
163
|
-
|
|
159
|
+
__module_federation_bundler_runtime__.bundlerRuntime.installInitialConsumes({
|
|
164
160
|
webpackRequire: __webpack_require__,
|
|
165
161
|
installedModules: consumesLoadinginstalledModules,
|
|
166
162
|
initialConsumes: __webpack_require__.consumesLoadingData.initialConsumes,
|
|
167
|
-
moduleToHandlerMapping:
|
|
163
|
+
moduleToHandlerMapping: __module_federation_bundler_runtime__.consumesLoadingModuleToHandlerMapping
|
|
168
164
|
});
|
|
169
165
|
}
|
|
170
166
|
}
|
package/dist/exports.d.ts
CHANGED
|
@@ -14,9 +14,9 @@ export { MultiStats } from "./MultiStats";
|
|
|
14
14
|
export type { ChunkGroup } from "./ChunkGroup";
|
|
15
15
|
export type { NormalModuleFactory } from "./NormalModuleFactory";
|
|
16
16
|
export { NormalModule } from "./NormalModule";
|
|
17
|
-
|
|
17
|
+
declare const ModuleFilenameHelpers: any;
|
|
18
18
|
export { ModuleFilenameHelpers };
|
|
19
|
-
|
|
19
|
+
declare const Template: any;
|
|
20
20
|
export { Template };
|
|
21
21
|
export declare const WebpackError: ErrorConstructor;
|
|
22
22
|
export type { Watching } from "./Watching";
|
|
@@ -129,3 +129,6 @@ export type { SourceMapDevToolPluginOptions } from "./builtin-plugin";
|
|
|
129
129
|
export { EvalDevToolModulePlugin } from "./builtin-plugin";
|
|
130
130
|
export type { EvalDevToolModulePluginOptions } from "./builtin-plugin";
|
|
131
131
|
export { CssExtractRspackPlugin } from "./builtin-plugin";
|
|
132
|
+
export { RSCClientEntryPlugin } from "./builtin-plugin";
|
|
133
|
+
export { RSCClientReferenceManifestRspackPlugin } from "./builtin-plugin";
|
|
134
|
+
export { RSCServerReferenceManifestRspackPlugin } from "./builtin-plugin";
|
package/dist/exports.js
CHANGED
|
@@ -1,32 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
4
|
};
|
|
28
5
|
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;
|
|
6
|
+
exports.RSCClientEntryPlugin = 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;
|
|
7
|
+
exports.RSCServerReferenceManifestRspackPlugin = exports.RSCClientReferenceManifestRspackPlugin = void 0;
|
|
30
8
|
const { version: rspackVersion, webpackVersion } = require("../package.json");
|
|
31
9
|
exports.rspackVersion = rspackVersion;
|
|
32
10
|
exports.version = webpackVersion;
|
|
@@ -48,7 +26,7 @@ Object.defineProperty(exports, "MultiStats", { enumerable: true, get: function (
|
|
|
48
26
|
var NormalModule_1 = require("./NormalModule");
|
|
49
27
|
Object.defineProperty(exports, "NormalModule", { enumerable: true, get: function () { return NormalModule_1.NormalModule; } });
|
|
50
28
|
// API extractor not working with some re-exports, see: https://github.com/microsoft/fluentui/issues/20694
|
|
51
|
-
const ModuleFilenameHelpers =
|
|
29
|
+
const ModuleFilenameHelpers = require("./lib/ModuleFilenameHelpers");
|
|
52
30
|
exports.ModuleFilenameHelpers = ModuleFilenameHelpers;
|
|
53
31
|
// API extractor not working with some re-exports, see: https://github.com/microsoft/fluentui/issues/20694
|
|
54
32
|
const Template = require("./Template");
|
|
@@ -146,3 +124,9 @@ var builtin_plugin_22 = require("./builtin-plugin");
|
|
|
146
124
|
Object.defineProperty(exports, "EvalDevToolModulePlugin", { enumerable: true, get: function () { return builtin_plugin_22.EvalDevToolModulePlugin; } });
|
|
147
125
|
var builtin_plugin_23 = require("./builtin-plugin");
|
|
148
126
|
Object.defineProperty(exports, "CssExtractRspackPlugin", { enumerable: true, get: function () { return builtin_plugin_23.CssExtractRspackPlugin; } });
|
|
127
|
+
var builtin_plugin_24 = require("./builtin-plugin");
|
|
128
|
+
Object.defineProperty(exports, "RSCClientEntryPlugin", { enumerable: true, get: function () { return builtin_plugin_24.RSCClientEntryPlugin; } });
|
|
129
|
+
var builtin_plugin_25 = require("./builtin-plugin");
|
|
130
|
+
Object.defineProperty(exports, "RSCClientReferenceManifestRspackPlugin", { enumerable: true, get: function () { return builtin_plugin_25.RSCClientReferenceManifestRspackPlugin; } });
|
|
131
|
+
var builtin_plugin_26 = require("./builtin-plugin");
|
|
132
|
+
Object.defineProperty(exports, "RSCServerReferenceManifestRspackPlugin", { enumerable: true, get: function () { return builtin_plugin_26.RSCServerReferenceManifestRspackPlugin; } });
|
|
@@ -520,7 +520,7 @@ async function runLoaders(compiler, rawContext) {
|
|
|
520
520
|
resolve({
|
|
521
521
|
content: (0, util_1.isNil)(content) ? undefined : (0, util_1.toBuffer)(content),
|
|
522
522
|
sourceMap: (0, util_1.serializeObject)(sourceMap),
|
|
523
|
-
additionalData,
|
|
523
|
+
additionalData: (0, util_1.serializeObject)(additionalData),
|
|
524
524
|
buildDependencies,
|
|
525
525
|
cacheable,
|
|
526
526
|
fileDependencies,
|
|
@@ -542,7 +542,7 @@ async function runLoaders(compiler, rawContext) {
|
|
|
542
542
|
: (0, util_1.toObject)(rawContext.sourceMap),
|
|
543
543
|
(0, util_1.isNil)(rawContext.additionalData)
|
|
544
544
|
? undefined
|
|
545
|
-
: rawContext.additionalData
|
|
545
|
+
: (0, util_1.toObject)(rawContext.additionalData)
|
|
546
546
|
], (err, result) => {
|
|
547
547
|
if (err) {
|
|
548
548
|
return reject(err);
|
|
@@ -551,7 +551,7 @@ async function runLoaders(compiler, rawContext) {
|
|
|
551
551
|
resolve({
|
|
552
552
|
content: (0, util_1.isNil)(content) ? undefined : (0, util_1.toBuffer)(content),
|
|
553
553
|
sourceMap: (0, util_1.serializeObject)(sourceMap),
|
|
554
|
-
additionalData,
|
|
554
|
+
additionalData: (0, util_1.serializeObject)(additionalData),
|
|
555
555
|
buildDependencies,
|
|
556
556
|
cacheable,
|
|
557
557
|
fileDependencies,
|
|
@@ -54,7 +54,7 @@ module.exports = function loadLoader(loader, callback) {
|
|
|
54
54
|
Object.assign({}, this.__internal__context, {
|
|
55
55
|
content: isNil(content) ? undefined : toBuffer(content),
|
|
56
56
|
sourceMap: serializeObject(sourceMap),
|
|
57
|
-
additionalData
|
|
57
|
+
additionalData: serializeObject(additionalData)
|
|
58
58
|
}));
|
|
59
59
|
// @ts-expect-error
|
|
60
60
|
this.__internal__context.additionalDataExternal =
|
|
@@ -69,7 +69,9 @@ module.exports = function loadLoader(loader, callback) {
|
|
|
69
69
|
context.buildDependencies.forEach(this.addBuildDependency);
|
|
70
70
|
callback(null, context.content, isNil(context.sourceMap)
|
|
71
71
|
? undefined
|
|
72
|
-
: toObject(context.sourceMap), isNil(context.additionalData)
|
|
72
|
+
: toObject(context.sourceMap), isNil(context.additionalData)
|
|
73
|
+
? undefined
|
|
74
|
+
: toObject(context.additionalData));
|
|
73
75
|
// @ts-expect-error
|
|
74
76
|
this._compilation.__internal__pushNativeDiagnostics(context.diagnosticsExternal);
|
|
75
77
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/core",
|
|
3
|
-
"version": "0.6.2-canary-
|
|
3
|
+
"version": "0.6.2-canary-d731478-20240425064305",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "A Fast Rust-based Web Bundler",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"styled-components": "^6.0.8",
|
|
61
61
|
"terser": "5.27.2",
|
|
62
62
|
"wast-loader": "^1.11.4",
|
|
63
|
-
"@rspack/
|
|
64
|
-
"@rspack/
|
|
63
|
+
"@rspack/core": "0.6.2-canary-d731478-20240425064305",
|
|
64
|
+
"@rspack/plugin-minify": "^0.6.2-canary-d731478-20240425064305"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@module-federation/runtime-tools": "0.1.6",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"webpack-sources": "3.2.3",
|
|
77
77
|
"zod": "^3.21.4",
|
|
78
78
|
"zod-validation-error": "1.3.1",
|
|
79
|
-
"@rspack/binding": "0.6.2-canary-
|
|
79
|
+
"@rspack/binding": "0.6.2-canary-d731478-20240425064305"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
82
|
"@swc/helpers": ">=0.5.1"
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ModuleFederationRuntimePlugin = void 0;
|
|
4
|
-
const binding_1 = require("@rspack/binding");
|
|
5
|
-
const base_1 = require("../builtin-plugin/base");
|
|
6
|
-
exports.ModuleFederationRuntimePlugin = (0, base_1.create)(binding_1.BuiltinPluginName.ModuleFederationRuntimePlugin, () => { });
|