From 567e29f3c96bbc1098bbcf6379aa8df7308d9581 Mon Sep 17 00:00:00 2001 From: Boaz Poolman Date: Sat, 27 Mar 2021 18:37:55 +0100 Subject: [PATCH] Check for exclusion when getting file config --- services/main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/main.js b/services/main.js index 58a2f7e..9adc07a 100644 --- a/services/main.js +++ b/services/main.js @@ -92,7 +92,11 @@ module.exports = { const type = file.split('.')[0]; // Grab the first part of the filename. const name = file.split(/\.(.+)/)[1].split('.').slice(0, -1).join('.'); // Grab the rest of the filename minus the file extension. - if (configType && configType !== type) { + if ( + configType && configType !== type || + !strapi.plugins['config-sync'].config.include.includes(type) || + strapi.plugins['config-sync'].config.exclude.includes(`${type}.${name}`) + ) { return; }