Skip to content

Commit

Permalink
createPluginsJs after copyCustomAdmin (#6626)
Browse files Browse the repository at this point in the history
Signed-off-by: ddhp <jessechen.jcc@gmail.com>
  • Loading branch information
ddhp committed Jun 18, 2020
1 parent d864c2c commit ac5b4fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/strapi-admin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,14 @@ async function createCacheDir(dir) {
// copy plugins code
await Promise.all(pluginsToCopy.map(name => copyPlugin(name, cacheDir)));

// create plugins.js with plugins requires
await createPluginsJs(pluginsToCopy, localPluginsToCopy, cacheDir);

// override admin code with user customizations
if (fs.pathExistsSync(path.join(dir, 'admin'))) {
await copyCustomAdmin(path.join(dir, 'admin'), cacheDir);
}

// create plugins.js with plugins requires
await createPluginsJs(pluginsToCopy, localPluginsToCopy, cacheDir);

// override plugins' admin code with user customizations
const pluginsToOverride = pluginsToCopy.reduce((acc, current) => {
const pluginName = current.replace(/^strapi-plugin-/i, '');
Expand Down

0 comments on commit ac5b4fd

Please sign in to comment.