@rsdoctor/core 0.4.11 → 0.4.12
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/build-utils/build/chunks/generateTileGraph.d.ts +1 -0
- package/dist/build-utils/build/chunks/generateTileGraph.d.ts.map +1 -1
- package/dist/build-utils/build/chunks/generateTileGraph.js +9 -3
- package/dist/inner-plugins/plugins/ensureModulesChunkGraph.d.ts.map +1 -1
- package/dist/inner-plugins/plugins/ensureModulesChunkGraph.js +2 -1
- package/package.json +7 -7
|
@@ -5,6 +5,7 @@ type IGenerateReportOpts = {
|
|
|
5
5
|
reportTitle?: string;
|
|
6
6
|
bundleDir?: string;
|
|
7
7
|
openBrowser?: boolean;
|
|
8
|
+
reportDir?: string;
|
|
8
9
|
};
|
|
9
10
|
export declare function generateTileGraph(bundleStats: Plugin.BaseStats, opts: IGenerateReportOpts, buildOutputPath: string): Promise<string | null>;
|
|
10
11
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateTileGraph.d.ts","sourceRoot":"","sources":["../../../../src/build-utils/build/chunks/generateTileGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAKzC,eAAO,MAAM,mBAAmB,6BAA6B,CAAC;AAE9D,KAAK,mBAAmB,GAAG;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"generateTileGraph.d.ts","sourceRoot":"","sources":["../../../../src/build-utils/build/chunks/generateTileGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAKzC,eAAO,MAAM,mBAAmB,6BAA6B,CAAC;AAE9D,KAAK,mBAAmB,GAAG;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAiBF,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,CAAC,SAAS,EAC7B,IAAI,EAAE,mBAAmB,EACzB,eAAe,EAAE,MAAM,0BAuBxB"}
|
|
@@ -52,13 +52,19 @@ async function generateJSONReportUtil(bundleStats, opts) {
|
|
|
52
52
|
}
|
|
53
53
|
async function generateTileGraph(bundleStats, opts, buildOutputPath) {
|
|
54
54
|
try {
|
|
55
|
-
const { reportFilename } = opts;
|
|
55
|
+
const { reportFilename, reportDir } = opts;
|
|
56
56
|
await generateJSONReportUtil(bundleStats, {
|
|
57
57
|
...opts,
|
|
58
58
|
openBrowser: false,
|
|
59
|
-
bundleDir: buildOutputPath
|
|
59
|
+
bundleDir: reportDir || buildOutputPath
|
|
60
60
|
});
|
|
61
|
-
return import_path.default.join(
|
|
61
|
+
return import_path.default.join(
|
|
62
|
+
reportDir ? import_path.default.resolve(
|
|
63
|
+
buildOutputPath,
|
|
64
|
+
import_path.default.relative(buildOutputPath, reportDir)
|
|
65
|
+
) : buildOutputPath,
|
|
66
|
+
`${reportFilename}`
|
|
67
|
+
);
|
|
62
68
|
} catch (e) {
|
|
63
69
|
(0, import_logger.debug)(() => `Generate webpack-bundle-analyzer tile graph has error:${e}`);
|
|
64
70
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ensureModulesChunkGraph.d.ts","sourceRoot":"","sources":["../../../src/inner-plugins/plugins/ensureModulesChunkGraph.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAuB,MAAM,iBAAiB,CAAC;AAWtE;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,aAC3B,MAAM,CAAC,YAAY,SACtB,sBAAsB,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,cAAc,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"ensureModulesChunkGraph.d.ts","sourceRoot":"","sources":["../../../src/inner-plugins/plugins/ensureModulesChunkGraph.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAuB,MAAM,iBAAiB,CAAC;AAWtE;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,aAC3B,MAAM,CAAC,YAAY,SACtB,sBAAsB,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,cAAc,EAAE,CAAC,SAiG5E,CAAC"}
|
|
@@ -105,7 +105,8 @@ const ensureModulesChunksGraphFn = (compiler, _this) => {
|
|
|
105
105
|
import_types2.Constants.RsdoctorOutputFolder,
|
|
106
106
|
import_build2.Chunks.TileGraphReportName
|
|
107
107
|
),
|
|
108
|
-
reportTitle: "bundle-analyzer"
|
|
108
|
+
reportTitle: "bundle-analyzer",
|
|
109
|
+
reportDir: _this.options.reportDir
|
|
109
110
|
},
|
|
110
111
|
compiler.outputPath
|
|
111
112
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdoctor/core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.12",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rsdoctor",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"axios": "^1.7.
|
|
65
|
+
"axios": "^1.7.9",
|
|
66
66
|
"enhanced-resolve": "5.12.0",
|
|
67
67
|
"filesize": "^10.1.6",
|
|
68
68
|
"fs-extra": "^11.1.1",
|
|
@@ -71,13 +71,13 @@
|
|
|
71
71
|
"semver": "^7.6.3",
|
|
72
72
|
"source-map": "^0.7.4",
|
|
73
73
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
74
|
-
"@rsdoctor/graph": "0.4.
|
|
75
|
-
"@rsdoctor/sdk": "0.4.
|
|
76
|
-
"@rsdoctor/types": "0.4.
|
|
77
|
-
"@rsdoctor/utils": "0.4.
|
|
74
|
+
"@rsdoctor/graph": "0.4.12",
|
|
75
|
+
"@rsdoctor/sdk": "0.4.12",
|
|
76
|
+
"@rsdoctor/types": "0.4.12",
|
|
77
|
+
"@rsdoctor/utils": "0.4.12"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@rspack/core": "^1.1.
|
|
80
|
+
"@rspack/core": "^1.1.6",
|
|
81
81
|
"@types/fs-extra": "^11.0.4",
|
|
82
82
|
"@types/lodash": "^4.17.13",
|
|
83
83
|
"@types/node": "^16",
|