fix: prefer source mod
This commit is contained in:
parent
23bfb384fc
commit
3252f681a3
|
@ -12,11 +12,12 @@ const r = eval('require');
|
|||
const config = readConfig();
|
||||
const paths = Object.entries(config).map(([plugin]) => {
|
||||
try {
|
||||
r.resolve(plugin);
|
||||
return plugin;
|
||||
const local = join(process.cwd(), 'src', plugin);
|
||||
r.resolve(local);
|
||||
return local;
|
||||
}
|
||||
catch (error) {
|
||||
return join(process.cwd(), plugin);
|
||||
return plugin;
|
||||
}
|
||||
});
|
||||
const latus = new Latus({
|
||||
|
|
|
@ -11,11 +11,12 @@ module.exports = new Promise(async (resolve, reject) => {
|
|||
const config = readConfig();
|
||||
const paths = Object.entries(config).map(([plugin]) => {
|
||||
try {
|
||||
require.resolve(plugin);
|
||||
return plugin;
|
||||
const local = join(process.cwd(), 'src', plugin);
|
||||
require.resolve(local);
|
||||
return local;
|
||||
}
|
||||
catch (error) {
|
||||
return join(process.cwd(), plugin);
|
||||
return plugin;
|
||||
}
|
||||
});
|
||||
const latus = new Latus({
|
||||
|
|
Loading…
Reference in New Issue
Block a user