mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-05 14:47:12 -04:00
Fixed plugin loading.
This commit is contained in:
parent
cba78089d0
commit
0ce10f0e39
1 changed files with 8 additions and 1 deletions
|
@ -26,6 +26,7 @@ const hooks = require('../../static/js/pluginfw/hooks.js');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const resolve = require('resolve');
|
const resolve = require('resolve');
|
||||||
const settings = require('../utils/Settings');
|
const settings = require('../utils/Settings');
|
||||||
|
import {pluginInstallPath} from '../../static/js/pluginfw/installer'
|
||||||
|
|
||||||
const templateCache = new Map();
|
const templateCache = new Map();
|
||||||
|
|
||||||
|
@ -82,7 +83,13 @@ exports.require = (name:string, args:{
|
||||||
basedir = path.dirname(mod.filename);
|
basedir = path.dirname(mod.filename);
|
||||||
paths = mod.paths;
|
paths = mod.paths;
|
||||||
}
|
}
|
||||||
paths.push(settings.root + '/plugin_packages')
|
|
||||||
|
/**
|
||||||
|
* Add the plugin install path to the paths array
|
||||||
|
*/
|
||||||
|
if (!paths.includes(pluginInstallPath)) {
|
||||||
|
paths.push(pluginInstallPath)
|
||||||
|
}
|
||||||
|
|
||||||
const ejspath = resolve.sync(name, {paths, basedir, extensions: ['.html', '.ejs']});
|
const ejspath = resolve.sync(name, {paths, basedir, extensions: ['.html', '.ejs']});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue