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 config = readConfig();
|
||||||
const paths = Object.entries(config).map(([plugin]) => {
|
const paths = Object.entries(config).map(([plugin]) => {
|
||||||
try {
|
try {
|
||||||
r.resolve(plugin);
|
const local = join(process.cwd(), 'src', plugin);
|
||||||
return plugin;
|
r.resolve(local);
|
||||||
|
return local;
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
return join(process.cwd(), plugin);
|
return plugin;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const latus = new Latus({
|
const latus = new Latus({
|
||||||
|
|
|
@ -11,11 +11,12 @@ module.exports = new Promise(async (resolve, reject) => {
|
||||||
const config = readConfig();
|
const config = readConfig();
|
||||||
const paths = Object.entries(config).map(([plugin]) => {
|
const paths = Object.entries(config).map(([plugin]) => {
|
||||||
try {
|
try {
|
||||||
require.resolve(plugin);
|
const local = join(process.cwd(), 'src', plugin);
|
||||||
return plugin;
|
require.resolve(local);
|
||||||
|
return local;
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
return join(process.cwd(), plugin);
|
return plugin;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const latus = new Latus({
|
const latus = new Latus({
|
||||||
|
|
Loading…
Reference in New Issue
Block a user