diff --git a/server/bootstrap.js b/server/bootstrap.js index 042a62a..223cb1f 100644 --- a/server/bootstrap.js +++ b/server/bootstrap.js @@ -16,13 +16,6 @@ const defaultTypes = require('./config/types'); */ module.exports = async () => { - // Import on bootstrap. - if (strapi.config.get('plugin.config-sync.importOnBootstrap')) { - if (fs.existsSync(strapi.config.get('plugin.config-sync.syncDir'))) { - await strapi.plugin('config-sync').service('main').importAllConfig(); - } - } - // Register config types. const registerTypes = () => { const types = {}; @@ -43,6 +36,13 @@ module.exports = async () => { }; strapi.plugin('config-sync').types = registerTypes(); + // Import on bootstrap. + if (strapi.config.get('plugin.config-sync.importOnBootstrap')) { + if (fs.existsSync(strapi.config.get('plugin.config-sync.syncDir'))) { + await strapi.plugin('config-sync').service('main').importAllConfig(); + } + } + // Register permission actions. const actions = [ {