Skip to content

Custom globbing, debuging, easier-to-understand output config#1

Open
MWDelaney wants to merge 3 commits into
mainfrom
1.2.0
Open

Custom globbing, debuging, easier-to-understand output config#1
MWDelaney wants to merge 3 commits into
mainfrom
1.2.0

Conversation

@MWDelaney
Copy link
Copy Markdown
Owner

@MWDelaney MWDelaney commented Oct 22, 2025

1.2.0 introduces 3 notable changes to Eleventy Reusable Components:

  1. Debugging -- useful output about components and the plugin's configuration when debugging is enabled in Eleventy
  2. Components outside the Input Directory -- Adjusted the method used for creating the components collection, allowing components to be placed outside Eleventy's input directory.
  3. Simpler control over output -- Removed complicated excludeFromProduction configuration variable and obscure environment variable check for outputting components during a built; replaced it with output boolean for a simpler developer experience.

Details:

Debugging and Developer Experience

  • Introduced a new src/debug.js module providing granular debug logging utilities for the plugin, including lifecycle logging, component discovery, filter execution, and error reporting. Debugging is controlled via a new debug option and environment variables.

  • Integrated debug logging into the component rendering filter (renderComponent), giving detailed, context-aware feedback during rendering and error scenarios.

Component Discovery and Collection

  • Changed the way components are collected: now uses manual globbing with Node's fs/promises.glob, allowing the plugin to find components even outside Eleventy's input directory. This provides more flexibility for project structure.

Configuration and Output Control

  • Replaced the excludeFromProduction option with a new output boolean, which more clearly controls whether components are written to their own output files or ignored. This change is reflected in the configuration, documentation, and plugin logic.

  • Added a debug option to the plugin's configuration, allowing users to easily enable or disable debug output.

These changes make the plugin more robust, easier to debug, and more flexible for advanced use cases.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant