@rsdoctor/rspack-plugin 0.2.5 → 0.3.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.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAA8B,KAAK,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAA8B,KAAK,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAcrE,OAAO,KAAK,EACV,sBAAsB,EACtB,+BAA+B,EAC/B,2BAA2B,EAC5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,MAAM,EAIP,MAAM,iBAAiB,CAAC;AAOzB,qBAAa,oBAAoB,CAAC,KAAK,SAAS,MAAM,CAAC,cAAc,EAAE,CACrE,YAAW,sBAAsB,CAAC,QAAQ,EAAE,KAAK,CAAC;IAElD,SAAgB,IAAI,0BAAiB;IAErC,SAAgB,GAAG,EAAE,kBAAkB,GAAG,gBAAgB,CAAC;IAEpD,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;IAgBxD,KAAK,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO;IA+CjC;;;;;OAKG;IACI,+BAA+B,CAAC,QAAQ,EAAE,QAAQ;IAIlD,IAAI,aAAoB,QAAQ,SAAS,KAAK,KAAG,QAAQ,IAAI,CAAC,CAwCnE;IAEK,eAAe,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM;CAwB3D"}
|
package/dist/plugin.js
CHANGED
|
@@ -115,6 +115,7 @@ class RsdoctorRspackPlugin {
|
|
|
115
115
|
}
|
|
116
116
|
if (this.options.features.bundle) {
|
|
117
117
|
new import_plugins.InternalBundlePlugin(this).apply(compiler);
|
|
118
|
+
new import_plugins.InternalBundleTagPlugin(this).apply(compiler);
|
|
118
119
|
}
|
|
119
120
|
new import_plugins.InternalRulesPlugin(this).apply(compiler);
|
|
120
121
|
new import_plugins.InternalErrorReporterPlugin(this).apply(compiler);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdoctor/rspack-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rsdoctor",
|
|
@@ -15,12 +15,11 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"loader-utils": "^2.0.4",
|
|
17
17
|
"lodash": "^4.17.21",
|
|
18
|
-
"
|
|
19
|
-
"@rsdoctor/
|
|
20
|
-
"@rsdoctor/
|
|
21
|
-
"@rsdoctor/
|
|
22
|
-
"@rsdoctor/
|
|
23
|
-
"@rsdoctor/types": "0.2.5"
|
|
18
|
+
"@rsdoctor/core": "0.3.0",
|
|
19
|
+
"@rsdoctor/graph": "0.3.0",
|
|
20
|
+
"@rsdoctor/sdk": "0.3.0",
|
|
21
|
+
"@rsdoctor/utils": "0.3.0",
|
|
22
|
+
"@rsdoctor/types": "0.3.0"
|
|
24
23
|
},
|
|
25
24
|
"devDependencies": {
|
|
26
25
|
"@rspack/core": "0.6.5",
|
|
@@ -28,7 +27,6 @@
|
|
|
28
27
|
"@types/lodash": "^4.17.0",
|
|
29
28
|
"@types/node": "^16",
|
|
30
29
|
"@types/tapable": "2.2.2",
|
|
31
|
-
"@types/webpack-sources": "^3.2.3",
|
|
32
30
|
"tslib": "2.4.1",
|
|
33
31
|
"typescript": "^5.2.2"
|
|
34
32
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bundleTagPlugin.d.ts","sourceRoot":"","sources":["../src/bundleTagPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAC;AAI7C,qBAAa,eAAe;IAC1B,KAAK,CAAC,QAAQ,EAAE,QAAQ;CAoCzB"}
|
package/dist/bundleTagPlugin.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var bundleTagPlugin_exports = {};
|
|
20
|
-
__export(bundleTagPlugin_exports, {
|
|
21
|
-
BundleTagPlugin: () => BundleTagPlugin
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(bundleTagPlugin_exports);
|
|
24
|
-
var import_path = require("path");
|
|
25
|
-
var import_webpack_sources = require("webpack-sources");
|
|
26
|
-
class BundleTagPlugin {
|
|
27
|
-
apply(compiler) {
|
|
28
|
-
compiler.hooks.compilation.tap("RsdoctorTagBannerPlugin", (compilation) => {
|
|
29
|
-
compilation.hooks.processAssets.tapPromise(
|
|
30
|
-
{
|
|
31
|
-
name: "RsdoctorTagBannerPlugin",
|
|
32
|
-
stage: -2e3
|
|
33
|
-
},
|
|
34
|
-
async () => {
|
|
35
|
-
const chunks = compilation.chunks;
|
|
36
|
-
for (let chunk of chunks) {
|
|
37
|
-
for (const file of chunk.files) {
|
|
38
|
-
if (!file || (0, import_path.extname)(file) !== ".js") {
|
|
39
|
-
continue;
|
|
40
|
-
}
|
|
41
|
-
compilation.updateAsset(
|
|
42
|
-
file,
|
|
43
|
-
(old) => {
|
|
44
|
-
const concatSource = new import_webpack_sources.ConcatSource();
|
|
45
|
-
let header = "\n console.log('RSDOCTOR_START::');\n";
|
|
46
|
-
let footer = "\n console.log('RSDOCTOR_END::');\n";
|
|
47
|
-
concatSource.add(header);
|
|
48
|
-
concatSource.add(old);
|
|
49
|
-
concatSource.add(footer);
|
|
50
|
-
return concatSource;
|
|
51
|
-
},
|
|
52
|
-
() => {
|
|
53
|
-
}
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
63
|
-
0 && (module.exports = {
|
|
64
|
-
BundleTagPlugin
|
|
65
|
-
});
|