mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-04 14:50:24 +00:00
fix: centralize Windows bundled Jiti loader policy (#62286) (thanks @chen-zhang-cs-code)
This commit is contained in:
@@ -8,8 +8,8 @@ import { resolveBundledPluginPublicSurfacePath } from "./public-surface-runtime.
|
||||
import {
|
||||
buildPluginLoaderAliasMap,
|
||||
buildPluginLoaderJitiOptions,
|
||||
resolvePluginLoaderJitiTryNative,
|
||||
resolveLoaderPackageRoot,
|
||||
shouldPreferNativeJiti,
|
||||
} from "./sdk-alias.js";
|
||||
|
||||
const OPENCLAW_PACKAGE_ROOT =
|
||||
@@ -70,8 +70,9 @@ function resolvePublicSurfaceLocation(params: {
|
||||
}
|
||||
|
||||
function getJiti(modulePath: string) {
|
||||
const tryNative =
|
||||
shouldPreferNativeJiti(modulePath) || modulePath.includes(`${path.sep}dist${path.sep}`);
|
||||
const tryNative = resolvePluginLoaderJitiTryNative(modulePath, {
|
||||
preferBuiltDist: true,
|
||||
});
|
||||
const sharedLoader = getSharedBundledPublicSurfaceJiti(modulePath, tryNative);
|
||||
if (sharedLoader) {
|
||||
return sharedLoader;
|
||||
|
||||
Reference in New Issue
Block a user