Skip to content

Fix: Include loose LESS files in less/plugins when using build.includes (fixes #3661) - #3838

Open
swashbuck wants to merge 1 commit into
masterfrom
issue/3661
Open

swashbuck wants to merge 1 commit into
masterfrom
issue/3661

Conversation

@swashbuck

Copy link
Copy Markdown
Contributor

Fixes #3661

Fix

  • With build.includes set, LESS files placed directly in a plugin's less/plugins/ folder (e.g. less/plugins/speed.less) are now compiled. Previously any path containing /less/plugins was treated as a nested plugin-specific folder, and the file was dropped silently because speed.less is not a folder named after an included plugin.
  • The nested check now only applies to files inside a less/plugins/<plugin>/ subfolder, so plugin-specific styles such as vanilla's less/plugins/adapt-contrib-gmcq/ are still left out when that plugin is not included.

Testing

  1. Add a .less file with a unique selector directly in an included plugin's less/plugins/ folder, e.g. src/components/adapt-contrib-media/less/plugins/test.less.
  2. In config.json, set build.includes to the plugins in use, leaving out one plugin that vanilla has a less/plugins/<plugin>/ folder for (e.g. adapt-contrib-gmcq).
  3. Run grunt dev and search build/adapt.css for the selectors:
    • The loose less/plugins/test.less selector is present (missing before this fix).
    • Selectors from vanilla's less/plugins/<included-plugin>/ folders are present.
    • Selectors from vanilla's less/plugins/<excluded-plugin>/ folder are absent.
  4. Remove build.includes and rebuild: all of the above are present, as before.

Tested on v5.56.3.

Posted via collaboration with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Needs Reviewing

Development

Successfully merging this pull request may close these issues.

LESS files in a plugin's less/plugins/ subfolder ignored when using build.includes

1 participant