Skip to content

Commit aaafa7e

Browse files
authored
chore(rsdoctor-analysis): inline Rslib runtime (#9)
1 parent a1f962f commit aaafa7e

File tree

3 files changed

+25
-20
lines changed

3 files changed

+25
-20
lines changed

packages/rsdoctor-analysis/rslib.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ export default defineConfig({
2121
legalComments: 'none',
2222
cleanDistPath: true,
2323
},
24+
tools: {
25+
rspack: {
26+
optimization: {
27+
runtimeChunk: false,
28+
},
29+
},
30+
},
2431
},
2532
],
2633
});

skills/rsdoctor-analysis/scripts/rsdoctor.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,23 @@ import * as __rspack_external_node_events_0a6aefe7 from "node:events";
44
import * as __rspack_external_node_fs_5ea92f0c from "node:fs";
55
import * as __rspack_external_node_path_c5b9b54f from "node:path";
66
import * as __rspack_external_node_process_786449bf from "node:process";
7-
import { __webpack_require__ } from "./rslib-runtime.js";
7+
var __webpack_modules__ = {};
8+
var __webpack_module_cache__ = {};
9+
function __webpack_require__(moduleId) {
10+
var cachedModule = __webpack_module_cache__[moduleId];
11+
if (void 0 !== cachedModule) return cachedModule.exports;
12+
var module = __webpack_module_cache__[moduleId] = {
13+
exports: {}
14+
};
15+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
16+
return module.exports;
17+
}
18+
__webpack_require__.m = __webpack_modules__;
19+
(()=>{
20+
__webpack_require__.add = function(modules) {
21+
Object.assign(__webpack_require__.m, modules);
22+
};
23+
})();
824
__webpack_require__.add({
925
"node:child_process" (module) {
1026
module.exports = __rspack_external_node_child_process_27f17141;
@@ -2950,3 +2966,4 @@ run().catch((error)=>{
29502966
console.error(message);
29512967
process.exit(1);
29522968
});
2969+
export { __webpack_require__ };

skills/rsdoctor-analysis/scripts/rslib-runtime.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)