@rsdoctor/webpack-plugin 0.4.6 → 0.4.8
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/README.md +1 -1
- package/dist/plugin.d.ts +0 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +1 -5
- package/dist/plugins/resolver.js +2 -2
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ This Rsdoctor plugin is an analysis plugin for the Webpack builder.
|
|
|
11
11
|
|
|
12
12
|
## Note
|
|
13
13
|
|
|
14
|
-
This plugin is used by the `Webpack` repo to open Rsdoctor, [
|
|
14
|
+
This plugin is used by the `Webpack` repo to open Rsdoctor, [Quick Start](https://rsdoctor.dev/guide/start/quick-start).
|
|
15
15
|
|
|
16
16
|
Initialize the RsdoctorWebpackPlugin plugin in the [plugins](https://webpack.js.org/configuration/plugins/#plugins) section of the `webpack.config.js` file, as shown below:
|
|
17
17
|
|
package/dist/plugin.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export declare class RsdoctorWebpackPlugin<Rules extends Linter.ExtendRuleData[]
|
|
|
9
9
|
readonly sdk: RsdoctorWebpackSDK;
|
|
10
10
|
readonly isRsdoctorPlugin: boolean;
|
|
11
11
|
modulesGraph: ModuleGraph;
|
|
12
|
-
private outsideInstance;
|
|
13
12
|
_bootstrapTask: Promise<unknown>;
|
|
14
13
|
protected browserIsOpened: boolean;
|
|
15
14
|
chunkGraph: ChunkGraph;
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,sBAAsB,EACtB,+BAA+B,EAC/B,4BAA4B,EAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAe,kBAAk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AAS;IAE3B,UAAU,EAAE,UAAU,CAAC;gBAElB,OAAO,CAAC,EAAE,4BAA4B,CAAC,KAAK,CAAC;IAuBzD,KAAK,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO;IA8D1B,YAAY,aAAc,QAAQ,KAAG,IAAI,CAoC9C;IAEK,SAAS,aAAoB,QAAQ,KAAG,OAAO,CAAC,IAAI,CAAC,CAW1D;IAEF;;;;;OAKG;IACI,+BAA+B,CAAC,QAAQ,EAAE,QAAQ;IAIlD,IAAI,QAAa,OAAO,CAAC,IAAI,CAAC,CA0BnC;CACH"}
|
package/dist/plugin.js
CHANGED
|
@@ -47,7 +47,6 @@ var import_build_utils = require("@rsdoctor/core/build-utils");
|
|
|
47
47
|
class RsdoctorWebpackPlugin {
|
|
48
48
|
constructor(options) {
|
|
49
49
|
this.name = import_constants.pluginTapName;
|
|
50
|
-
this.outsideInstance = false;
|
|
51
50
|
this.browserIsOpened = false;
|
|
52
51
|
this.afterPlugins = (compiler) => {
|
|
53
52
|
if (compiler.isChild())
|
|
@@ -126,7 +125,6 @@ class RsdoctorWebpackPlugin {
|
|
|
126
125
|
brief: this.options.brief
|
|
127
126
|
}
|
|
128
127
|
});
|
|
129
|
-
this.outsideInstance = Boolean(this.options.sdkInstance);
|
|
130
128
|
this.modulesGraph = new import_graph.ModuleGraph();
|
|
131
129
|
this.chunkGraph = new import_graph.ChunkGraph();
|
|
132
130
|
this.isRsdoctorPlugin = true;
|
|
@@ -135,9 +133,7 @@ class RsdoctorWebpackPlugin {
|
|
|
135
133
|
if (!this._bootstrapTask) {
|
|
136
134
|
this._bootstrapTask = this.sdk.bootstrap();
|
|
137
135
|
}
|
|
138
|
-
|
|
139
|
-
(0, import_plugins.setSDK)(this.sdk);
|
|
140
|
-
}
|
|
136
|
+
(0, import_plugins.setSDK)(this.sdk);
|
|
141
137
|
new import_plugins.InternalSummaryPlugin(this).apply(compiler);
|
|
142
138
|
if (this.options.features.loader) {
|
|
143
139
|
new import_build_utils.Loader.ProbeLoaderPlugin().apply(compiler);
|
package/dist/plugins/resolver.js
CHANGED
|
@@ -106,12 +106,12 @@ class RsdoctorResolverPlugin {
|
|
|
106
106
|
return "";
|
|
107
107
|
}
|
|
108
108
|
apply(resolver) {
|
|
109
|
-
resolver.hooks.result.tap(this.tapOptions, (request,
|
|
109
|
+
resolver.hooks.result.tap(this.tapOptions, (request, resolveCtx) => {
|
|
110
110
|
const { context } = request;
|
|
111
111
|
const ctx = this.contextMap.get(context.issuer);
|
|
112
112
|
if (ctx) {
|
|
113
113
|
const data = this.getResolverData(context, {
|
|
114
|
-
request: this.getResolveRequest(request.request,
|
|
114
|
+
request: this.getResolveRequest(request.request, resolveCtx),
|
|
115
115
|
query: request.query,
|
|
116
116
|
result: request.path
|
|
117
117
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdoctor/webpack-plugin",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.8",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rsdoctor",
|
|
@@ -15,16 +15,16 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"fs-extra": "^11.1.1",
|
|
17
17
|
"lodash": "^4.17.21",
|
|
18
|
-
"@rsdoctor/core": "0.4.
|
|
19
|
-
"@rsdoctor/
|
|
20
|
-
"@rsdoctor/
|
|
21
|
-
"@rsdoctor/utils": "0.4.
|
|
22
|
-
"@rsdoctor/types": "0.4.
|
|
18
|
+
"@rsdoctor/core": "0.4.8",
|
|
19
|
+
"@rsdoctor/sdk": "0.4.8",
|
|
20
|
+
"@rsdoctor/graph": "0.4.8",
|
|
21
|
+
"@rsdoctor/utils": "0.4.8",
|
|
22
|
+
"@rsdoctor/types": "0.4.8"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"webpack": "^5.
|
|
25
|
+
"webpack": "^5.95.0",
|
|
26
26
|
"@types/fs-extra": "^11.0.4",
|
|
27
|
-
"@types/lodash": "^4.17.
|
|
27
|
+
"@types/lodash": "^4.17.10",
|
|
28
28
|
"@types/node": "^16",
|
|
29
29
|
"@types/tapable": "2.2.7",
|
|
30
30
|
"tslib": "2.7.0",
|