@rsdoctor/rspack-plugin 0.3.10 → 0.3.12-alpha.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/plugin.d.ts +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +14 -6
- package/dist/probeLoaderPlugin.d.ts.map +1 -1
- package/dist/probeLoaderPlugin.js +11 -0
- package/package.json +7 -7
package/dist/plugin.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare class RsdoctorRspackPlugin<Rules extends Linter.ExtendRuleData[]>
|
|
|
20
20
|
* @memberof RsdoctorWebpackPlugin
|
|
21
21
|
*/
|
|
22
22
|
ensureModulesChunksGraphApplied(compiler: Plugin.BaseCompilerType<'rspack'>): void;
|
|
23
|
-
done: (compiler: Plugin.BaseCompilerType<
|
|
23
|
+
done: (compiler: Plugin.BaseCompilerType<"rspack">) => Promise<void>;
|
|
24
24
|
getRspackConfig(compiler: Plugin.BaseCompilerType<'rspack'>): void;
|
|
25
25
|
}
|
|
26
26
|
//# sourceMappingURL=plugin.d.ts.map
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAcrE,OAAO,KAAK,EACV,4BAA4B,EAC5B,+BAA+B,EAC/B,2BAA2B,EAC5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,MAAM,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAcrE,OAAO,KAAK,EACV,4BAA4B,EAC5B,+BAA+B,EAC/B,2BAA2B,EAC5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,MAAM,EAGN,MAAM,EACP,MAAM,iBAAiB,CAAC;AAOzB,qBAAa,oBAAoB,CAAC,KAAK,SAAS,MAAM,CAAC,cAAc,EAAE,CACrE,YAAW,4BAA4B,CAAC,KAAK,CAAC;IAE9C,SAAgB,IAAI,0BAAiB;IAErC,SAAgB,GAAG,EAAE,kBAAkB,GAAG,gBAAgB,CAAC;IAE3D,SAAgB,gBAAgB,EAAE,OAAO,CAAC;IAEnC,cAAc,EAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEzC,SAAS,CAAC,eAAe,UAAS;IAE3B,YAAY,EAAE,WAAW,CAAC;IAE1B,OAAO,EAAE,+BAA+B,CAAC,KAAK,CAAC,CAAC;IAEhD,eAAe,EAAE,OAAO,CAAC;gBAEpB,OAAO,CAAC,EAAE,2BAA2B,CAAC,KAAK,CAAC;IA+BxD,KAAK,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO;IAgEjC;;;;;OAKG;IACI,+BAA+B,CACpC,QAAQ,EAAE,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC;IAKtC,IAAI,aACC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC,KAC1C,OAAO,CAAC,IAAI,CAAC,CA6Bd;IAEK,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC;CA2BnE"}
|
package/dist/plugin.js
CHANGED
|
@@ -83,8 +83,11 @@ class RsdoctorRspackPlugin {
|
|
|
83
83
|
name: import_constants.pluginTapName,
|
|
84
84
|
root: process.cwd(),
|
|
85
85
|
type: this.options.reportCodeType,
|
|
86
|
-
config: {
|
|
87
|
-
|
|
86
|
+
config: {
|
|
87
|
+
disableTOSUpload: this.options.disableTOSUpload,
|
|
88
|
+
innerClientPath: this.options.innerClientPath,
|
|
89
|
+
printLog: this.options.printLog
|
|
90
|
+
}
|
|
88
91
|
});
|
|
89
92
|
this.outsideInstance = Boolean(this.options.sdkInstance);
|
|
90
93
|
this.modulesGraph = new import_graph.ModuleGraph();
|
|
@@ -108,11 +111,16 @@ class RsdoctorRspackPlugin {
|
|
|
108
111
|
new import_plugins.InternalSummaryPlugin(this).apply(
|
|
109
112
|
compiler
|
|
110
113
|
);
|
|
111
|
-
if (this.options.features.loader
|
|
114
|
+
if (this.options.features.loader) {
|
|
112
115
|
new import_probeLoaderPlugin.ProbeLoaderPlugin().apply(compiler);
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
);
|
|
116
|
+
this.sdk.addClientRoutes([
|
|
117
|
+
import_types.Manifest.RsdoctorManifestClientRoutes.WebpackLoaders
|
|
118
|
+
]);
|
|
119
|
+
if (!import_common.Loader.isVue(compiler)) {
|
|
120
|
+
new import_plugins.InternalLoaderPlugin(this).apply(
|
|
121
|
+
compiler
|
|
122
|
+
);
|
|
123
|
+
}
|
|
116
124
|
}
|
|
117
125
|
if (this.options.features.plugins) {
|
|
118
126
|
new import_plugins.InternalPluginsPlugin(this).apply(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"probeLoaderPlugin.d.ts","sourceRoot":"","sources":["../src/probeLoaderPlugin.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"probeLoaderPlugin.d.ts","sourceRoot":"","sources":["../src/probeLoaderPlugin.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAQzC,qBAAa,iBAAiB;IAC5B,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,YAAY;IAoBnC,OAAO,CAAC,cAAc;CA0DvB"}
|
|
@@ -34,6 +34,7 @@ module.exports = __toCommonJS(probeLoaderPlugin_exports);
|
|
|
34
34
|
var import_build_utils = require("@rsdoctor/core/build-utils");
|
|
35
35
|
var import_path = __toESM(require("path"));
|
|
36
36
|
var import_core = require("@rsdoctor/core");
|
|
37
|
+
var import_common = require("@rsdoctor/utils/common");
|
|
37
38
|
const BuiltinLoaderName = "builtin:swc-loader";
|
|
38
39
|
const ESMLoaderFile = ".mjs";
|
|
39
40
|
class ProbeLoaderPlugin {
|
|
@@ -65,6 +66,7 @@ class ProbeLoaderPlugin {
|
|
|
65
66
|
loader: import_path.default.join(__dirname, "./probeLoader.js"),
|
|
66
67
|
options: {
|
|
67
68
|
..._options,
|
|
69
|
+
ident: void 0,
|
|
68
70
|
type: "end",
|
|
69
71
|
builderName: compiler.options.name
|
|
70
72
|
}
|
|
@@ -73,6 +75,7 @@ class ProbeLoaderPlugin {
|
|
|
73
75
|
loader: import_path.default.join(__dirname, "./probeLoader.js"),
|
|
74
76
|
options: {
|
|
75
77
|
..._options,
|
|
78
|
+
ident: void 0,
|
|
76
79
|
type: "start",
|
|
77
80
|
builderName: compiler.options.name
|
|
78
81
|
}
|
|
@@ -80,6 +83,14 @@ class ProbeLoaderPlugin {
|
|
|
80
83
|
}
|
|
81
84
|
return rule;
|
|
82
85
|
};
|
|
86
|
+
if (import_common.Loader.isVue(compiler)) {
|
|
87
|
+
compiler.options.module.rules = import_build_utils.Utils.addProbeLoader2Rules(
|
|
88
|
+
rules,
|
|
89
|
+
appendRule,
|
|
90
|
+
(r) => !!r.loader
|
|
91
|
+
);
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
83
94
|
compiler.options.module.rules = import_build_utils.Utils.addProbeLoader2Rules(
|
|
84
95
|
rules,
|
|
85
96
|
appendRule,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdoctor/rspack-plugin",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.12-alpha.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rsdoctor",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"loader-utils": "^2.0.4",
|
|
17
17
|
"lodash": "^4.17.21",
|
|
18
|
-
"@rsdoctor/core": "0.3.
|
|
19
|
-
"@rsdoctor/graph": "0.3.
|
|
20
|
-
"@rsdoctor/sdk": "0.3.
|
|
21
|
-
"@rsdoctor/utils": "0.3.
|
|
22
|
-
"@rsdoctor/types": "0.3.
|
|
18
|
+
"@rsdoctor/core": "0.3.12-alpha.0",
|
|
19
|
+
"@rsdoctor/graph": "0.3.12-alpha.0",
|
|
20
|
+
"@rsdoctor/sdk": "0.3.12-alpha.0",
|
|
21
|
+
"@rsdoctor/utils": "0.3.12-alpha.0",
|
|
22
|
+
"@rsdoctor/types": "0.3.12-alpha.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@rspack/core": "0.7.5",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"typescript": "^5.2.2"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@rspack/core": "
|
|
34
|
+
"@rspack/core": "*"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public",
|