@tachybase/loader 1.3.37 → 1.3.39
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/lib/index.js +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -1
package/lib/index.js
CHANGED
|
@@ -24,7 +24,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
24
24
|
var import_node_module = require("node:module");
|
|
25
25
|
var import_node_path = require("node:path");
|
|
26
26
|
const defineLoader = /* @__PURE__ */ __name((whitelists, originalLoad, lookingPaths) => function(request, parent, isMain) {
|
|
27
|
-
if (whitelists.has(request) || request.startsWith("@tachybase/")) {
|
|
27
|
+
if (whitelists.has(request) || request.startsWith("@tachybase/") || request.startsWith("@tego/")) {
|
|
28
28
|
try {
|
|
29
29
|
const resolvedFromApp = require.resolve(request, { paths: lookingPaths });
|
|
30
30
|
return originalLoad(resolvedFromApp, parent, isMain);
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -11,7 +11,7 @@ export const defineLoader = (
|
|
|
11
11
|
function (request, parent, isMain) {
|
|
12
12
|
// 使用白名单拦截,以及所有符合 '@tachybase/' 前缀的包
|
|
13
13
|
// TODO 未来支持动态的前缀判定或者更严格的判定
|
|
14
|
-
if (whitelists.has(request) || request.startsWith('@tachybase/')) {
|
|
14
|
+
if (whitelists.has(request) || request.startsWith('@tachybase/') || request.startsWith('@tego/')) {
|
|
15
15
|
try {
|
|
16
16
|
const resolvedFromApp = require.resolve(request, { paths: lookingPaths });
|
|
17
17
|
return originalLoad(resolvedFromApp, parent, isMain);
|