Fix plugin modules not loading

Fix the path to plugin modules using the old plugins dir instead of
resolving to the actual path of the plugin, which in turn caused no
plugin modules to be loaded.
This commit is contained in:
Hornwitser committed 2020-10-23 18:13:13 +02:00
1 parent 7968d89345
commit 65f0845398
1 file changed
+2 -1
+2 -1
View File
@@ -384,7 +384,8 @@ class Instance extends link.Link{
// Find plugin modules to patch in
let modules = new Map();
for (let [pluginName, plugin] of this.plugins) {
let modulePath = path.join("plugins", pluginName, "module");
let pluginPackagePath = require.resolve(path.posix.join(plugin.info.requirePath, "package.json"));
let modulePath = path.join(path.dirname(pluginPackagePath), "module");
if (!await fs.pathExists(modulePath)) {
continue;
}