@rsdoctor/rspack-plugin 1.4.0 → 1.5.0
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/index.cjs +18 -18
- package/dist/index.js +18 -18
- package/package.json +7 -7
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
const __rslib_import_meta_url__ = "u" < typeof document ? new (require('url'.replace('', ''))).URL('file:' + __filename).href : document.currentScript && document.currentScript.src || new URL('main.js', document.baseURI).href;
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
4
|
"./package.json" (module) {
|
|
5
|
-
module.exports = JSON.parse('{"name":"@rsdoctor/rspack-plugin","version":"1.
|
|
5
|
+
module.exports = JSON.parse('{"name":"@rsdoctor/rspack-plugin","version":"1.5.0","repository":{"type":"git","url":"https://github.com/web-infra-dev/rsdoctor","directory":"packages/rspack-plugin"},"license":"MIT","main":"dist/index.cjs","types":"dist/index.d.ts","files":["dist"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.cjs"}},"type":"module","scripts":{"dev":"npm run start","start":"rslib build -w","build":"rslib build","test":"rstest run"},"dependencies":{"@rsdoctor/core":"workspace:*","@rsdoctor/graph":"workspace:*","@rsdoctor/sdk":"workspace:*","@rsdoctor/types":"workspace:*","@rsdoctor/utils":"workspace:*"},"devDependencies":{"@rspack/core":"1.7.1","@types/node":"^22.8.1","@types/tapable":"2.2.7","tslib":"2.8.1","typescript":"^5.9.2"},"peerDependencies":{"@rspack/core":"*"},"peerDependenciesMeta":{"@rspack/core":{"optional":true}},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"}}');
|
|
6
6
|
}
|
|
7
7
|
}, __webpack_module_cache__ = {};
|
|
8
8
|
function __webpack_require__(moduleId) {
|
|
@@ -42,7 +42,7 @@ for(var __rspack_i in (()=>{
|
|
|
42
42
|
let pluginTapName = 'RsdoctorRspackPlugin', pluginTapPostOptions = {
|
|
43
43
|
name: pluginTapName,
|
|
44
44
|
stage: 999
|
|
45
|
-
}, pkg = __webpack_require__("./package.json"), graph_namespaceObject = require("@rsdoctor/graph"), common_namespaceObject = require("@rsdoctor/utils/common"), logger_namespaceObject = require("@rsdoctor/utils/logger");
|
|
45
|
+
}, pkg = __webpack_require__("./package.json"), graph_namespaceObject = require("@rsdoctor/graph"), common_namespaceObject = require("@rsdoctor/utils/common"), logger_namespaceObject = require("@rsdoctor/utils/logger"), hasGreeted = !1;
|
|
46
46
|
class RsdoctorRspackPlugin {
|
|
47
47
|
name = pluginTapName;
|
|
48
48
|
sdk;
|
|
@@ -75,8 +75,8 @@ for(var __rspack_i in (()=>{
|
|
|
75
75
|
apply(compiler) {
|
|
76
76
|
(0, logger_namespaceObject.time)('RsdoctorRspackPlugin.apply');
|
|
77
77
|
try {
|
|
78
|
-
logger_namespaceObject.logger.greet(`
|
|
79
|
-
\nRsdoctor v${pkg.version}\n`), this._bootstrapTask || (this._bootstrapTask = this.sdk.bootstrap()), compiler.options.name && this.sdk.setName(compiler.options.name), (0, plugins_namespaceObject.setSDK)(this.sdk), compiler.hooks.afterPlugins.tap(pluginTapPostOptions, this.afterPlugins.bind(this, compiler)), compiler.hooks.done.tapPromise({
|
|
78
|
+
hasGreeted || compiler.isChild() || (hasGreeted = !0, logger_namespaceObject.logger.greet(`
|
|
79
|
+
\nRsdoctor v${pkg.version}\n`)), this._bootstrapTask || (this._bootstrapTask = this.sdk.bootstrap()), compiler.options.name && this.sdk.setName(compiler.options.name), (0, plugins_namespaceObject.setSDK)(this.sdk), compiler.hooks.afterPlugins.tap(pluginTapPostOptions, this.afterPlugins.bind(this, compiler)), compiler.hooks.done.tapPromise({
|
|
80
80
|
...pluginTapPostOptions,
|
|
81
81
|
stage: pluginTapPostOptions.stage + 100
|
|
82
82
|
}, this.done.bind(this, compiler)), new plugins_namespaceObject.InternalSummaryPlugin(this).apply(compiler), this.options.features.loader && (new build_utils_namespaceObject.Loader.ProbeLoaderPlugin().apply(compiler), this.sdk.addClientRoutes([
|
|
@@ -87,8 +87,8 @@ for(var __rspack_i in (()=>{
|
|
|
87
87
|
logger_namespaceObject.logger.debug('[RspackNativePlugin] Enabled');
|
|
88
88
|
let enableNativePlugin = this.options.experiments?.enableNativePlugin;
|
|
89
89
|
new RsdoctorRspackNativePlugin({
|
|
90
|
-
moduleGraphFeatures:
|
|
91
|
-
chunkGraphFeatures:
|
|
90
|
+
moduleGraphFeatures: enableNativePlugin?.moduleGraph ?? !0,
|
|
91
|
+
chunkGraphFeatures: enableNativePlugin?.chunkGraph ?? !0,
|
|
92
92
|
sourceMapFeatures: {
|
|
93
93
|
cheap: !1,
|
|
94
94
|
module: !1
|
|
@@ -143,20 +143,20 @@ for(var __rspack_i in (()=>{
|
|
|
143
143
|
if (globalController) return globalController;
|
|
144
144
|
let controller = new sdk_namespaceObject.RsdoctorSDKController();
|
|
145
145
|
return globalController = controller, controller;
|
|
146
|
-
})(), normallizedOptions = (0, plugins_namespaceObject.normalizeUserConfig)(options)
|
|
146
|
+
})(), normallizedOptions = (0, plugins_namespaceObject.normalizeUserConfig)(options), instance = controller.createSlave({
|
|
147
|
+
name: options.name || 'Builder',
|
|
148
|
+
stage: options.stage,
|
|
149
|
+
extraConfig: {
|
|
150
|
+
innerClientPath: normallizedOptions.innerClientPath,
|
|
151
|
+
printLog: normallizedOptions.printLog,
|
|
152
|
+
mode: normallizedOptions.output.mode ? normallizedOptions.output.mode : void 0,
|
|
153
|
+
brief: normallizedOptions.output.mode === types_namespaceObject.SDK.IMode[types_namespaceObject.SDK.IMode.brief] && normallizedOptions.output.options || void 0
|
|
154
|
+
},
|
|
155
|
+
type: normallizedOptions.output.reportCodeType
|
|
156
|
+
});
|
|
147
157
|
super({
|
|
148
158
|
...options,
|
|
149
|
-
sdkInstance:
|
|
150
|
-
name: options.name || 'Builder',
|
|
151
|
-
stage: options.stage,
|
|
152
|
-
extraConfig: {
|
|
153
|
-
innerClientPath: normallizedOptions.innerClientPath,
|
|
154
|
-
printLog: normallizedOptions.printLog,
|
|
155
|
-
mode: normallizedOptions.output.mode ? normallizedOptions.output.mode : void 0,
|
|
156
|
-
brief: normallizedOptions.output.mode === types_namespaceObject.SDK.IMode[types_namespaceObject.SDK.IMode.brief] && normallizedOptions.output.options || void 0
|
|
157
|
-
},
|
|
158
|
-
type: normallizedOptions.output.reportCodeType
|
|
159
|
-
})
|
|
159
|
+
sdkInstance: instance
|
|
160
160
|
}), this.controller = controller;
|
|
161
161
|
}
|
|
162
162
|
apply(compiler) {
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { Loader as common_Loader } from "@rsdoctor/utils/common";
|
|
|
9
9
|
import { logger, time, timeEnd } from "@rsdoctor/utils/logger";
|
|
10
10
|
var __webpack_modules__ = {
|
|
11
11
|
"./package.json" (module) {
|
|
12
|
-
module.exports = JSON.parse('{"name":"@rsdoctor/rspack-plugin","version":"1.
|
|
12
|
+
module.exports = JSON.parse('{"name":"@rsdoctor/rspack-plugin","version":"1.5.0","repository":{"type":"git","url":"https://github.com/web-infra-dev/rsdoctor","directory":"packages/rspack-plugin"},"license":"MIT","main":"dist/index.cjs","types":"dist/index.d.ts","files":["dist"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.cjs"}},"type":"module","scripts":{"dev":"npm run start","start":"rslib build -w","build":"rslib build","test":"rstest run"},"dependencies":{"@rsdoctor/core":"workspace:*","@rsdoctor/graph":"workspace:*","@rsdoctor/sdk":"workspace:*","@rsdoctor/types":"workspace:*","@rsdoctor/utils":"workspace:*"},"devDependencies":{"@rspack/core":"1.7.1","@types/node":"^22.8.1","@types/tapable":"2.2.7","tslib":"2.8.1","typescript":"^5.9.2"},"peerDependencies":{"@rspack/core":"*"},"peerDependenciesMeta":{"@rspack/core":{"optional":true}},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"}}');
|
|
13
13
|
}
|
|
14
14
|
}, __webpack_module_cache__ = {};
|
|
15
15
|
let pluginTapName = 'RsdoctorRspackPlugin', pluginTapPostOptions = {
|
|
@@ -22,7 +22,7 @@ let pluginTapName = 'RsdoctorRspackPlugin', pluginTapPostOptions = {
|
|
|
22
22
|
exports: {}
|
|
23
23
|
};
|
|
24
24
|
return __webpack_modules__[moduleId](module, module.exports, __webpack_require__), module.exports;
|
|
25
|
-
}("./package.json");
|
|
25
|
+
}("./package.json"), hasGreeted = !1;
|
|
26
26
|
class RsdoctorRspackPlugin {
|
|
27
27
|
name = pluginTapName;
|
|
28
28
|
sdk;
|
|
@@ -55,8 +55,8 @@ class RsdoctorRspackPlugin {
|
|
|
55
55
|
apply(compiler) {
|
|
56
56
|
time('RsdoctorRspackPlugin.apply');
|
|
57
57
|
try {
|
|
58
|
-
logger.greet(`
|
|
59
|
-
\nRsdoctor v${pkg.version}\n`), this._bootstrapTask || (this._bootstrapTask = this.sdk.bootstrap()), compiler.options.name && this.sdk.setName(compiler.options.name), setSDK(this.sdk), compiler.hooks.afterPlugins.tap(pluginTapPostOptions, this.afterPlugins.bind(this, compiler)), compiler.hooks.done.tapPromise({
|
|
58
|
+
hasGreeted || compiler.isChild() || (hasGreeted = !0, logger.greet(`
|
|
59
|
+
\nRsdoctor v${pkg.version}\n`)), this._bootstrapTask || (this._bootstrapTask = this.sdk.bootstrap()), compiler.options.name && this.sdk.setName(compiler.options.name), setSDK(this.sdk), compiler.hooks.afterPlugins.tap(pluginTapPostOptions, this.afterPlugins.bind(this, compiler)), compiler.hooks.done.tapPromise({
|
|
60
60
|
...pluginTapPostOptions,
|
|
61
61
|
stage: pluginTapPostOptions.stage + 100
|
|
62
62
|
}, this.done.bind(this, compiler)), new InternalSummaryPlugin(this).apply(compiler), this.options.features.loader && (new Loader.ProbeLoaderPlugin().apply(compiler), this.sdk.addClientRoutes([
|
|
@@ -67,8 +67,8 @@ class RsdoctorRspackPlugin {
|
|
|
67
67
|
logger.debug('[RspackNativePlugin] Enabled');
|
|
68
68
|
let enableNativePlugin = this.options.experiments?.enableNativePlugin;
|
|
69
69
|
new RsdoctorRspackNativePlugin({
|
|
70
|
-
moduleGraphFeatures:
|
|
71
|
-
chunkGraphFeatures:
|
|
70
|
+
moduleGraphFeatures: enableNativePlugin?.moduleGraph ?? !0,
|
|
71
|
+
chunkGraphFeatures: enableNativePlugin?.chunkGraph ?? !0,
|
|
72
72
|
sourceMapFeatures: {
|
|
73
73
|
cheap: !1,
|
|
74
74
|
module: !1
|
|
@@ -123,20 +123,20 @@ class RsdoctorRspackMultiplePlugin extends RsdoctorRspackPlugin {
|
|
|
123
123
|
if (globalController) return globalController;
|
|
124
124
|
let controller = new RsdoctorSDKController();
|
|
125
125
|
return globalController = controller, controller;
|
|
126
|
-
})(), normallizedOptions = normalizeUserConfig(options)
|
|
126
|
+
})(), normallizedOptions = normalizeUserConfig(options), instance = controller.createSlave({
|
|
127
|
+
name: options.name || 'Builder',
|
|
128
|
+
stage: options.stage,
|
|
129
|
+
extraConfig: {
|
|
130
|
+
innerClientPath: normallizedOptions.innerClientPath,
|
|
131
|
+
printLog: normallizedOptions.printLog,
|
|
132
|
+
mode: normallizedOptions.output.mode ? normallizedOptions.output.mode : void 0,
|
|
133
|
+
brief: normallizedOptions.output.mode === SDK.IMode[SDK.IMode.brief] && normallizedOptions.output.options || void 0
|
|
134
|
+
},
|
|
135
|
+
type: normallizedOptions.output.reportCodeType
|
|
136
|
+
});
|
|
127
137
|
super({
|
|
128
138
|
...options,
|
|
129
|
-
sdkInstance:
|
|
130
|
-
name: options.name || 'Builder',
|
|
131
|
-
stage: options.stage,
|
|
132
|
-
extraConfig: {
|
|
133
|
-
innerClientPath: normallizedOptions.innerClientPath,
|
|
134
|
-
printLog: normallizedOptions.printLog,
|
|
135
|
-
mode: normallizedOptions.output.mode ? normallizedOptions.output.mode : void 0,
|
|
136
|
-
brief: normallizedOptions.output.mode === SDK.IMode[SDK.IMode.brief] && normallizedOptions.output.options || void 0
|
|
137
|
-
},
|
|
138
|
-
type: normallizedOptions.output.reportCodeType
|
|
139
|
-
})
|
|
139
|
+
sdkInstance: instance
|
|
140
140
|
}), this.controller = controller;
|
|
141
141
|
}
|
|
142
142
|
apply(compiler) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdoctor/rspack-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rsdoctor",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
},
|
|
22
22
|
"type": "module",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@rsdoctor/
|
|
25
|
-
"@rsdoctor/
|
|
26
|
-
"@rsdoctor/
|
|
27
|
-
"@rsdoctor/
|
|
28
|
-
"@rsdoctor/
|
|
24
|
+
"@rsdoctor/core": "1.5.0",
|
|
25
|
+
"@rsdoctor/graph": "1.5.0",
|
|
26
|
+
"@rsdoctor/types": "1.5.0",
|
|
27
|
+
"@rsdoctor/sdk": "1.5.0",
|
|
28
|
+
"@rsdoctor/utils": "1.5.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@rspack/core": "1.
|
|
31
|
+
"@rspack/core": "1.7.1",
|
|
32
32
|
"@types/node": "^22.8.1",
|
|
33
33
|
"@types/tapable": "2.2.7",
|
|
34
34
|
"tslib": "2.8.1",
|