Skip to content

Conversation

@Hugoer
Copy link
Member

@Hugoer Hugoer commented Apr 29, 2025

Description

This PR fixes the way PostCSS plugins are loaded by adding support for plugin entries defined as [pluginName, options].

Previously, only string-based plugin names were allowed, which prevented the use of more advanced plugins that require configuration objects (e.g. postcss-extract-media-query). This change ensures that both string and array formats are supported when defining PostCSS plugins in the build configuration.

Unit tests have been added to verify proper behavior, including:

  • Loading plugins as strings
  • Loading plugins with options
  • Skipping invalid or falsy entries
  • Throwing on malformed plugin definitions

This update improves the flexibility and compatibility of the build pipeline with the wider PostCSS ecosystem.

Related Issue

Fixes #123

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.
  • All new and existing tests passed.

@Hugoer Hugoer requested a review from easingthemes April 29, 2025 17:56
@Hugoer Hugoer requested a review from quicoto April 30, 2025 07:10
@quicoto quicoto merged commit 7cf82ce into Netcentric:main May 5, 2025
3 checks passed
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.

PostCSS plugins with configuration objects not supported

3 participants