@rsdoctor/core 1.1.2 → 1.1.3
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/build-utils/build/module-graph/webpack/transform.d.ts.map +1 -1
- package/dist/build-utils/build/module-graph/webpack/transform.js +1 -1
- package/dist/inner-plugins/plugins/bundleTagPlugin.d.ts.map +1 -1
- package/dist/inner-plugins/plugins/bundleTagPlugin.js +20 -0
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../../../src/build-utils/build/module-graph/webpack/transform.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAiB9C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACnD,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,YAAY,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAAC;CACvE;AA6BD;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,OAAO,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,EAClD,WAAW,CAAC,EAAE,OAAO,CAAC,WAAW,EACjC,MAAM,UAAQ,GACb,GAAG,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAQxC;
|
|
1
|
+
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../../../src/build-utils/build/module-graph/webpack/transform.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAiB9C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACnD,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,YAAY,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAAC;CACvE;AA6BD;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,OAAO,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,EAClD,WAAW,CAAC,EAAE,OAAO,CAAC,WAAW,EACjC,MAAM,UAAQ,GACb,GAAG,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAQxC;AA2LD,wBAAsB,8BAA8B,CAClD,WAAW,EAAE,MAAM,CAAC,eAAe,EACnC,KAAK,EAAE,GAAG,CAAC,mBAAmB,EAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC,6BAA6B,EAC/C,OAAO,CAAC,EAAE,gBAAgB,oCA0B3B"}
|
|
@@ -110,7 +110,7 @@ function getModuleSource(modulePath, wbFs, sourceMap) {
|
|
|
110
110
|
} catch (e) {
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
return
|
|
113
|
+
return readFile(modulePath, wbFs);
|
|
114
114
|
}
|
|
115
115
|
async function appendModuleData(origin, webpackGraph, graph, wbFs, features, context) {
|
|
116
116
|
const module2 = graph.getModuleByWebpackId((0, import_compatible.getWebpackModuleId)(origin));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundleTagPlugin.d.ts","sourceRoot":"","sources":["../../../src/inner-plugins/plugins/bundleTagPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAG5C,qBAAa,uBAAuB,CAClC,CAAC,SAAS,MAAM,CAAC,YAAY,CAC7B,SAAQ,kBAAkB,CAAC,CAAC,CAAC;IAC7B,SAAgB,IAAI,eAAe;IAE5B,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,YAAY;
|
|
1
|
+
{"version":3,"file":"bundleTagPlugin.d.ts","sourceRoot":"","sources":["../../../src/inner-plugins/plugins/bundleTagPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAG5C,qBAAa,uBAAuB,CAClC,CAAC,SAAS,MAAM,CAAC,YAAY,CAC7B,SAAQ,kBAAkB,CAAC,CAAC,CAAC;IAC7B,SAAgB,IAAI,eAAe;IAE5B,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,YAAY;CAoF3C"}
|
|
@@ -48,6 +48,26 @@ class InternalBundleTagPlugin extends import_base.InternalBasePlugin {
|
|
|
48
48
|
"Rsdoctor's `supports.banner` option is enabled, this is for debugging only. Do not use it for production."
|
|
49
49
|
)
|
|
50
50
|
);
|
|
51
|
+
const minimizers = compiler.options.optimization?.minimizer || [];
|
|
52
|
+
const terserPlugin = minimizers.find(
|
|
53
|
+
(plugin) => plugin?.constructor?.name === "TerserPlugin"
|
|
54
|
+
);
|
|
55
|
+
const swcPlugin = minimizers.find(
|
|
56
|
+
(plugin) => plugin?.constructor?.name === "SwcJsMinimizerRspackPlugin"
|
|
57
|
+
);
|
|
58
|
+
const hasTerserPlugin = !!terserPlugin;
|
|
59
|
+
const hasSwcJsMinimizer = !!swcPlugin;
|
|
60
|
+
if (hasTerserPlugin || hasSwcJsMinimizer) {
|
|
61
|
+
const terserDropConsole = terserPlugin?.options?.minimizer?.options?.compress?.drop_console;
|
|
62
|
+
const swcDropConsole = swcPlugin?._args?.[0]?.minimizerOptions?.compress?.drop_console;
|
|
63
|
+
if (terserDropConsole === true || swcDropConsole === true) {
|
|
64
|
+
import_logger.logger.warn(
|
|
65
|
+
import_logger.chalk.yellow(
|
|
66
|
+
"Warning: BannerPlugin detected in project. Please disable drop_console option in TerserPlugin or SwcJsMinimizerRspackPlugin to enable Rsdoctor analysis for BannerPlugin."
|
|
67
|
+
)
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
51
71
|
const chunks = compilation.chunks;
|
|
52
72
|
for (let chunk of chunks) {
|
|
53
73
|
for (const file of chunk.files) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdoctor/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rsdoctor",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@rsbuild/plugin-check-syntax": "1.3.0",
|
|
66
|
-
"axios": "^1.
|
|
66
|
+
"axios": "^1.9.0",
|
|
67
67
|
"browserslist-load-config": "^1.0.0",
|
|
68
68
|
"enhanced-resolve": "5.12.0",
|
|
69
69
|
"filesize": "^10.1.6",
|
|
@@ -73,15 +73,15 @@
|
|
|
73
73
|
"semver": "^7.6.3",
|
|
74
74
|
"source-map": "^0.7.4",
|
|
75
75
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
76
|
-
"@rsdoctor/
|
|
77
|
-
"@rsdoctor/types": "1.1.
|
|
78
|
-
"@rsdoctor/utils": "1.1.
|
|
79
|
-
"@rsdoctor/
|
|
76
|
+
"@rsdoctor/graph": "1.1.3",
|
|
77
|
+
"@rsdoctor/types": "1.1.3",
|
|
78
|
+
"@rsdoctor/utils": "1.1.3",
|
|
79
|
+
"@rsdoctor/sdk": "1.1.3"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@rspack/core": "1.3.
|
|
82
|
+
"@rspack/core": "1.3.11",
|
|
83
83
|
"@types/fs-extra": "^11.0.4",
|
|
84
|
-
"@types/lodash": "^4.17.
|
|
84
|
+
"@types/lodash": "^4.17.17",
|
|
85
85
|
"@types/node": "^22.8.1",
|
|
86
86
|
"@types/node-fetch": "^2.6.12",
|
|
87
87
|
"@types/path-browserify": "1.0.3",
|