@rsdoctor/core 0.1.2 → 0.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.
|
@@ -77,29 +77,33 @@ class InternalLoaderPlugin extends import_base.InternalBasePlugin {
|
|
|
77
77
|
return loader;
|
|
78
78
|
});
|
|
79
79
|
const newLoaders = (0, import_lodash.cloneDeep)(originLoaders);
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
80
|
+
if (typeof compiler.options.cache === "object" && "version" in compiler.options.cache && typeof compiler.options.cache.version === "string" && compiler.options.cache.version.indexOf("next/dist/build") > -1) {
|
|
81
|
+
callback(loaderContext, module2);
|
|
82
|
+
} else {
|
|
83
|
+
const proxyModule = new Proxy(module2, {
|
|
84
|
+
get(target, p, receiver) {
|
|
85
|
+
if (p === "loaders")
|
|
86
|
+
return newLoaders;
|
|
87
|
+
return Reflect.get(target, p, receiver);
|
|
88
|
+
},
|
|
89
|
+
set(target, p, newValue, receiver) {
|
|
90
|
+
const _newValue = (0, import_lodash.cloneDeep)(newValue);
|
|
91
|
+
if (p === "loaders") {
|
|
92
|
+
if (Array.isArray(_newValue)) {
|
|
93
|
+
newLoaders.length = 0;
|
|
94
|
+
_newValue.forEach((e) => {
|
|
95
|
+
newLoaders.push(e);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
94
98
|
}
|
|
99
|
+
return Reflect.set(target, p, _newValue, receiver);
|
|
100
|
+
},
|
|
101
|
+
deleteProperty(target, p) {
|
|
102
|
+
return Reflect.deleteProperty(target, p);
|
|
95
103
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
return Reflect.deleteProperty(target, p);
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
callback(loaderContext, proxyModule);
|
|
104
|
+
});
|
|
105
|
+
callback(loaderContext, proxyModule);
|
|
106
|
+
}
|
|
103
107
|
if (!(0, import_lodash.isEqual)(originLoaders, newLoaders)) {
|
|
104
108
|
const rules = this.getInterceptRules(
|
|
105
109
|
compiler,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdoctor/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rsdoctor",
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"semver": "^7.5.4",
|
|
52
52
|
"source-map": "^0.7.4",
|
|
53
53
|
"webpack-bundle-analyzer": "^4.9.1",
|
|
54
|
-
"@rsdoctor/graph": "0.1.
|
|
55
|
-
"@rsdoctor/sdk": "0.1.
|
|
56
|
-
"@rsdoctor/utils": "0.1.
|
|
57
|
-
"@rsdoctor/types": "0.1.
|
|
54
|
+
"@rsdoctor/graph": "0.1.3",
|
|
55
|
+
"@rsdoctor/sdk": "0.1.3",
|
|
56
|
+
"@rsdoctor/utils": "0.1.3",
|
|
57
|
+
"@rsdoctor/types": "0.1.3"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/bytes": "3.1.1",
|