@rsdoctor/core 0.4.1 → 0.4.2
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/module-graph/webpack/transform.d.ts.map +1 -1
- package/dist/build-utils/build/module-graph/webpack/transform.js +1 -1
- package/dist/build-utils/build/utils/loader.js +1 -1
- package/dist/inner-plugins/plugins/bundle.d.ts.map +1 -1
- package/dist/inner-plugins/plugins/bundle.js +6 -9
- package/package.json +6 -7
|
@@ -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;AAEnC,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAU,WAAW,EAAe,MAAM,iBAAiB,CAAC;AAmBnE,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;
|
|
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;AAEnC,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAU,WAAW,EAAe,MAAM,iBAAiB,CAAC;AAmBnE,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;AAsND,wBAAsB,8BAA8B,CAClD,WAAW,EAAE,MAAM,CAAC,eAAe,EACnC,KAAK,EAAE,WAAW,EAClB,QAAQ,CAAC,EAAE,MAAM,CAAC,6BAA6B,EAC/C,OAAO,CAAC,EAAE,gBAAgB,wBA2B3B"}
|
|
@@ -125,7 +125,7 @@ async function appendModuleData(origin, webpackGraph, graph, wbFs, features, con
|
|
|
125
125
|
module2.setProgram(program);
|
|
126
126
|
module2.meta.hasSetEsModuleStatement = (0, import_parser.hasSetEsModuleStatement)(program);
|
|
127
127
|
}
|
|
128
|
-
const transformed = (0, import_compatible.isExternalModule)(origin) ? "" : module2.getSource().transformed.length > 0 ? module2.getSource().transformed : (0, import_lodash.isFunction)(origin?.originalSource) ? origin.originalSource()?.source()?.toString() : "";
|
|
128
|
+
const transformed = (0, import_compatible.isExternalModule)(origin) ? "" : module2.getSource().transformed.length > 0 ? module2.getSource().transformed : (0, import_lodash.isFunction)(origin?.originalSource) ? origin.originalSource()?.source()?.toString() ?? "" : "";
|
|
129
129
|
const transformedSize = (0, import_compatible.isExternalModule)(origin) ? 0 : module2.getSize().transformedSize > 0 ? module2.getSize().transformedSize : Buffer.from(transformed).byteLength;
|
|
130
130
|
module2.setSource({
|
|
131
131
|
transformed,
|
|
@@ -89,7 +89,7 @@ function extractLoaderName(loaderPath, cwd = "") {
|
|
|
89
89
|
return res;
|
|
90
90
|
}
|
|
91
91
|
function mapEachRules(rules, callback) {
|
|
92
|
-
return rules.map((rule) => {
|
|
92
|
+
return rules.filter(Boolean).map((rule) => {
|
|
93
93
|
if (typeof rule === "string") {
|
|
94
94
|
return callback({
|
|
95
95
|
loader: rule
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../../src/inner-plugins/plugins/bundle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../../src/inner-plugins/plugins/bundle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAG5C,qBAAa,oBAAoB,CAC/B,CAAC,SAAS,MAAM,CAAC,YAAY,CAC7B,SAAQ,kBAAkB,CAAC,CAAC,CAAC;IAC7B,SAAgB,IAAI,YAAY;IAEzB,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAa;IAElD,KAAK,CAAC,QAAQ,EAAE,CAAC;IAOjB,kBAAkB,CAAC,IAAI,EAAE,MAAM;iBATH,MAAM;;IAiBlC,eAAe,gBAAiB,MAAM,CAAC,eAAe,UAuC3D;IAEK,IAAI,QAAa,OAAO,CAAC,IAAI,CAAC,CASnC;CACH"}
|
|
@@ -41,15 +41,12 @@ class InternalBundlePlugin extends import_base.InternalBasePlugin {
|
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
43
|
} else if (compilation.hooks.processAssets && "afterProcessAssets" in compilation.hooks) {
|
|
44
|
-
compilation.hooks.afterProcessAssets.tap(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
);
|
|
44
|
+
compilation.hooks.afterProcessAssets.tap(this.tapPostOptions, () => {
|
|
45
|
+
Object.keys(compilation.assets).forEach((file) => {
|
|
46
|
+
const v = this.ensureAssetContent(file);
|
|
47
|
+
v.content = compilation.assets[file].source().toString();
|
|
48
|
+
});
|
|
49
|
+
});
|
|
53
50
|
} else if ("afterOptimizeChunkAssets" in compilation.hooks) {
|
|
54
51
|
compilation.hooks.afterOptimizeChunkAssets.tap(
|
|
55
52
|
this.tapPostOptions,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdoctor/core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rsdoctor",
|
|
@@ -73,10 +73,10 @@
|
|
|
73
73
|
"source-map": "^0.7.4",
|
|
74
74
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
75
75
|
"webpack-sources": "^3.2.3",
|
|
76
|
-
"@rsdoctor/graph": "0.4.
|
|
77
|
-
"@rsdoctor/sdk": "0.4.
|
|
78
|
-
"@rsdoctor/types": "0.4.
|
|
79
|
-
"@rsdoctor/utils": "0.4.
|
|
76
|
+
"@rsdoctor/graph": "0.4.2",
|
|
77
|
+
"@rsdoctor/sdk": "0.4.2",
|
|
78
|
+
"@rsdoctor/types": "0.4.2",
|
|
79
|
+
"@rsdoctor/utils": "0.4.2"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@rspack/core": "0.7.5",
|
|
@@ -88,14 +88,13 @@
|
|
|
88
88
|
"@types/path-browserify": "1.0.3",
|
|
89
89
|
"@types/semver": "^7.5.8",
|
|
90
90
|
"@types/tapable": "2.2.7",
|
|
91
|
-
"@types/webpack": "5.28.5",
|
|
92
91
|
"@types/webpack-sources": "^3.2.3",
|
|
93
92
|
"babel-loader": "9.1.3",
|
|
94
93
|
"string-loader": "0.0.1",
|
|
95
94
|
"ts-loader": "^9.5.1",
|
|
96
95
|
"tslib": "2.4.1",
|
|
97
96
|
"typescript": "^5.2.2",
|
|
98
|
-
"webpack": "^5.
|
|
97
|
+
"webpack": "^5.90.0",
|
|
99
98
|
"@scripts/test-helper": "0.1.1"
|
|
100
99
|
},
|
|
101
100
|
"publishConfig": {
|