@rsdoctor/webpack-plugin 0.1.0-beta → 0.1.1
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 +30 -3
- package/dist/multiple.d.ts +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/plugins/resolver.js +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,11 +1,38 @@
|
|
|
1
|
-
# Rsdoctor
|
|
1
|
+
# Rsdoctor plugin
|
|
2
2
|
|
|
3
|
-
Rsdoctor is
|
|
3
|
+
This Rsdoctor plugin is an analysis plugin for the Webpack builder.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## features
|
|
6
|
+
|
|
7
|
+
- Rsdoctor is a one-stop tool for diagnosing and analyzing the build process and build artifacts.
|
|
8
|
+
- Rsdoctor is a tool that supports Webpack and Rspack build analysis.
|
|
9
|
+
- Rsdoctor is an analysis tool that can display the time-consuming and behavioral details of the compilation.
|
|
10
|
+
- Rsdoctor is a tool that provides bundle Diff and other anti-degradation capabilities simultaneously.
|
|
11
|
+
|
|
12
|
+
## Note
|
|
13
|
+
|
|
14
|
+
This plugin is used by the `Webpack` repo to open Rsdoctor, [Quik Start](https://rsdoctor.dev/guide/start/quick-start).
|
|
15
|
+
|
|
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
|
+
|
|
18
|
+
```js title="webpack.config.js"
|
|
19
|
+
const { RsdoctorWebpackPlugin } = require('@rsdoctor/webpack-plugin');
|
|
20
|
+
|
|
21
|
+
module.exports = {
|
|
22
|
+
// ...
|
|
23
|
+
plugins: [
|
|
24
|
+
process.env.RSDOCTOR &&
|
|
25
|
+
new RsdoctorWebpackPlugin({
|
|
26
|
+
// options
|
|
27
|
+
}),
|
|
28
|
+
].filter(Boolean),
|
|
29
|
+
};
|
|
30
|
+
```
|
|
6
31
|
|
|
7
32
|
## Documentation
|
|
8
33
|
|
|
34
|
+
https://rsdoctor.dev/
|
|
35
|
+
|
|
9
36
|
## Contributing
|
|
10
37
|
|
|
11
38
|
Please read the [Contributing Guide](https://github.com/web-infra-dev/rsdoctor/blob/main/CONTRIBUTING.md).
|
package/dist/multiple.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Linter } from '@rsdoctor/types';
|
|
1
|
+
import type { Linter } from '@rsdoctor/types';
|
|
2
2
|
import type { RsdoctorWebpackMultiplePluginOptions } from '@rsdoctor/core';
|
|
3
3
|
import { RsdoctorWebpackPlugin } from './plugin';
|
|
4
4
|
export declare class RsdoctorWebpackMultiplePlugin<Rules extends Linter.ExtendRuleData[]> extends RsdoctorWebpackPlugin<Rules> {
|
package/dist/plugin.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { RsdoctorPluginInstance, RsdoctorPluginOptionsNormalized, RsdoctorW
|
|
|
2
2
|
import { ChunkGraph, ModuleGraph } from '@rsdoctor/graph';
|
|
3
3
|
import { RsdoctorWebpackSDK } from '@rsdoctor/sdk';
|
|
4
4
|
import { Linter } from '@rsdoctor/types';
|
|
5
|
-
import { Compiler } from 'webpack';
|
|
5
|
+
import type { Compiler } from 'webpack';
|
|
6
6
|
export declare class RsdoctorWebpackPlugin<Rules extends Linter.ExtendRuleData[]> implements RsdoctorPluginInstance<Compiler, Rules> {
|
|
7
7
|
readonly name = "RsdoctorWebpackPlugin";
|
|
8
8
|
readonly options: RsdoctorPluginOptionsNormalized<Rules>;
|
package/dist/plugins/resolver.js
CHANGED
|
@@ -97,7 +97,7 @@ class RsdoctorResolverPlugin {
|
|
|
97
97
|
getResolveRequest(request, ctx) {
|
|
98
98
|
if (request)
|
|
99
99
|
return request;
|
|
100
|
-
if (ctx
|
|
100
|
+
if (ctx?.stack) {
|
|
101
101
|
const [target] = [...ctx.stack].map((e) => e.split(" ").map((e2) => e2.trim())).filter((e) => e.length > 2);
|
|
102
102
|
if (target) {
|
|
103
103
|
return target[target.length - 1];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdoctor/webpack-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rsdoctor",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"fs-extra": "^11.1.1",
|
|
17
17
|
"lodash": "^4.17.21",
|
|
18
18
|
"webpack": "^5.89.0",
|
|
19
|
-
"@rsdoctor/
|
|
20
|
-
"@rsdoctor/
|
|
21
|
-
"@rsdoctor/
|
|
22
|
-
"@rsdoctor/
|
|
19
|
+
"@rsdoctor/sdk": "0.1.1",
|
|
20
|
+
"@rsdoctor/core": "0.1.1",
|
|
21
|
+
"@rsdoctor/utils": "0.1.1",
|
|
22
|
+
"@rsdoctor/graph": "0.1.1"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/fs-extra": "^11.0.2",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@types/webpack": "5.28.0",
|
|
30
30
|
"tslib": "2.4.1",
|
|
31
31
|
"typescript": "^5.2.2",
|
|
32
|
-
"@rsdoctor/types": "0.1.
|
|
32
|
+
"@rsdoctor/types": "0.1.1"
|
|
33
33
|
},
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public",
|