From f4b660083f5afef8953cb7f83f0d18e96c857fbe Mon Sep 17 00:00:00 2001 From: Brad Simpson Date: Mon, 26 Oct 2026 10:47:09 -0600 Subject: [PATCH] Fix: Include loose LESS files in less/plugins when using build.includes --- grunt/helpers.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/grunt/helpers.js b/grunt/helpers.js index a6690e451..7345f934a 100644 --- a/grunt/helpers.js +++ b/grunt/helpers.js @@ -333,10 +333,10 @@ module.exports = function(grunt) { return false; } - // Check the LESS plugins folder exists. - // The LESS 'plugins' folder doesn't exist, so add the file, - // as the plugin has already been found in the previous check. - const nestedPluginsPath = !!pluginPath.match(/(?:.)+(?:\/less\/plugins)/g); + // Check whether the file is in a LESS plugins/ subfolder. + // If not, add the file, as the plugin has already been found in the + // previous check. Loose files directly in less/plugins/ are added too. + const nestedPluginsPath = /\/less\/plugins\/[^/]+\//.test(pluginPath); if (!nestedPluginsPath) { return true; }