@rspack/core 0.5.8-canary-0d77492-20240326114003 → 0.5.8-canary-1ec0571-20240327040504
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
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import * as tapable from "tapable";
|
|
12
12
|
import { Source } from "webpack-sources";
|
|
13
|
-
import type { ExternalObject, JsAssetInfo, JsCompilation, JsModule, JsRuntimeModule, JsStatsChunk, JsStatsError, PathData } from "@rspack/binding";
|
|
13
|
+
import type { ExternalObject, JsAssetInfo, JsCompatSource, JsCompilation, JsModule, JsRuntimeModule, JsStatsChunk, JsStatsError, PathData } from "@rspack/binding";
|
|
14
14
|
import { RspackOptionsNormalized, StatsOptions, OutputNormalized, StatsValue, RspackPluginInstance, Filename } from "./config";
|
|
15
15
|
import * as liteTapable from "./lite-tapable";
|
|
16
16
|
import { ContextModuleFactory } from "./ContextModuleFactory";
|
|
@@ -141,6 +141,13 @@ export declare class Compilation {
|
|
|
141
141
|
* @param {AssetInfo | function(AssetInfo): AssetInfo} assetInfoUpdateOrFunction new asset info or function converting old to new
|
|
142
142
|
*/
|
|
143
143
|
updateAsset(filename: string, newSourceOrFunction: Source | ((source: Source) => Source), assetInfoUpdateOrFunction: AssetInfo | ((assetInfo: AssetInfo) => AssetInfo)): void;
|
|
144
|
+
/**
|
|
145
|
+
*
|
|
146
|
+
* @param moduleIdentifier moduleIdentifier of the module you want to modify
|
|
147
|
+
* @param source
|
|
148
|
+
* @returns true if the setting is success, false if failed.
|
|
149
|
+
*/
|
|
150
|
+
setNoneAstModuleSource(moduleIdentifier: string, source: JsCompatSource): boolean;
|
|
144
151
|
/**
|
|
145
152
|
* Emit an not existing asset. Trying to emit an asset that already exists will throw an error.
|
|
146
153
|
*
|
package/dist/Compilation.js
CHANGED
|
@@ -312,6 +312,15 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
312
312
|
? jsAssetInfo => (0, util_1.toJsAssetInfo)(assetInfoUpdateOrFunction(jsAssetInfo))
|
|
313
313
|
: (0, util_1.toJsAssetInfo)(assetInfoUpdateOrFunction));
|
|
314
314
|
}
|
|
315
|
+
/**
|
|
316
|
+
*
|
|
317
|
+
* @param moduleIdentifier moduleIdentifier of the module you want to modify
|
|
318
|
+
* @param source
|
|
319
|
+
* @returns true if the setting is success, false if failed.
|
|
320
|
+
*/
|
|
321
|
+
setNoneAstModuleSource(moduleIdentifier, source) {
|
|
322
|
+
return __classPrivateFieldGet(this, _Compilation_inner, "f").setNoneAstModuleSource(moduleIdentifier, source);
|
|
323
|
+
}
|
|
315
324
|
/**
|
|
316
325
|
* Emit an not existing asset. Trying to emit an asset that already exists will throw an error.
|
|
317
326
|
*
|
|
@@ -65,11 +65,12 @@ module.exports = function () {
|
|
|
65
65
|
for (let stage of stages) {
|
|
66
66
|
if (typeof stage === "object" && stage !== null) {
|
|
67
67
|
const { name, version, factory, eager } = stage;
|
|
68
|
+
const options = { version, scope, get: factory };
|
|
68
69
|
if (shared[name]) {
|
|
69
|
-
shared[name].
|
|
70
|
+
shared[name].push(options);
|
|
70
71
|
}
|
|
71
72
|
else {
|
|
72
|
-
shared[name] =
|
|
73
|
+
shared[name] = [options];
|
|
73
74
|
}
|
|
74
75
|
}
|
|
75
76
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/core",
|
|
3
|
-
"version": "0.5.8-canary-
|
|
3
|
+
"version": "0.5.8-canary-1ec0571-20240327040504",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "A Fast Rust-based Web Bundler",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"styled-components": "^6.0.8",
|
|
57
57
|
"terser": "5.27.2",
|
|
58
58
|
"wast-loader": "^1.11.4",
|
|
59
|
-
"@rspack/core": "0.5.8-canary-
|
|
60
|
-
"@rspack/plugin-minify": "^0.5.8-canary-
|
|
59
|
+
"@rspack/core": "0.5.8-canary-1ec0571-20240327040504",
|
|
60
|
+
"@rspack/plugin-minify": "^0.5.8-canary-1ec0571-20240327040504"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@module-federation/runtime-tools": "0.0.8",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"webpack-sources": "3.2.3",
|
|
73
73
|
"zod": "^3.21.4",
|
|
74
74
|
"zod-validation-error": "1.3.1",
|
|
75
|
-
"@rspack/binding": "0.5.8-canary-
|
|
75
|
+
"@rspack/binding": "0.5.8-canary-1ec0571-20240327040504"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"@swc/helpers": ">=0.5.1"
|