diff --git a/packages/core/src/start.js b/packages/core/src/start.js index b6ade8b..bcf9168 100644 --- a/packages/core/src/start.js +++ b/packages/core/src/start.js @@ -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({ diff --git a/template/webpack.config.js b/template/webpack.config.js index 990d4f3..6f8e231 100644 --- a/template/webpack.config.js +++ b/template/webpack.config.js @@ -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({