mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 00:00:22 +00:00
plugins: symlink node_modules into dist plugin dir for bare-specifier resolution
This commit is contained in:
@@ -49,6 +49,12 @@ describe("stageBundledPluginRuntime", () => {
|
||||
expect(fs.realpathSync(path.join(runtimePluginDir, "node_modules"))).toBe(
|
||||
fs.realpathSync(sourcePluginNodeModulesDir),
|
||||
);
|
||||
|
||||
// dist/ also gets a node_modules symlink so bare-specifier resolution works
|
||||
// from the actual code location that the runtime wrapper re-exports into
|
||||
const distNodeModules = path.join(distPluginDir, "node_modules");
|
||||
expect(fs.lstatSync(distNodeModules).isSymbolicLink()).toBe(true);
|
||||
expect(fs.realpathSync(distNodeModules)).toBe(fs.realpathSync(sourcePluginNodeModulesDir));
|
||||
});
|
||||
|
||||
it("writes wrappers that forward plugin entry imports into canonical dist files", async () => {
|
||||
|
||||
Reference in New Issue
Block a user