mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 18:33:55 +00:00
Merge pull request #20879 from strapi/fix/issue-20298
fix: resolve internal plugins from the strapi pkg
This commit is contained in:
commit
1f44a7b49a
@ -90,7 +90,13 @@ export const getEnabledPlugins = async (strapi: Core.Strapi, { client } = { clie
|
||||
|
||||
for (const dep of INTERNAL_PLUGINS) {
|
||||
const packagePath = join(dep, 'package.json');
|
||||
const packageInfo = require(packagePath);
|
||||
|
||||
// NOTE: internal plugins should be resolved from the strapi package
|
||||
const packageModulePath = require.resolve(packagePath, {
|
||||
paths: [require.resolve('@strapi/strapi/package.json'), process.cwd()],
|
||||
});
|
||||
|
||||
const packageInfo = require(packageModulePath);
|
||||
|
||||
validatePluginName(packageInfo.strapi.name);
|
||||
internalPlugins[packageInfo.strapi.name] = {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user