Skip to content

fix(src/plugins): return default-exported plugins after validation - #281

Open
feritcemkahraman wants to merge 2 commits into
postcss:mainfrom
feritcemkahraman:fix-return-default-exported-plugins
Open

feritcemkahraman wants to merge 2 commits into
postcss:mainfrom
feritcemkahraman:fix-return-default-exported-plugins

Conversation

@feritcemkahraman

Copy link
Copy Markdown

Notable Changes

The loader unwraps a plugin's default export while validating it, but returns the original module wrapper in config.plugins. Passing that supposedly valid array into PostCSS then throws [object Object] is not a PostCSS plugin.

Return the unwrapped export. Keep plugin creators themselves unchanged so existing invocation and plugin-type behavior is preserved. The existing interop fixture now runs through PostCSS, and a second regression verifies that a default-exported transform actually changes a declaration. Contributor entries follow CONTRIBUTING.md.

Commit Message Summary (CHANGELOG)

fix(src/plugins): return default-exported plugins after validation

Type

  • Fix
  • Test

SemVer

  • Fix (Patch)

Validation

Both processor regressions reproduce the original failure and pass with the fix. Changed JavaScript files pass ESLint.

Full unit suite on Node 22/Windows: 32 pass, 15 fail. The same 15 failures reproduce with the original source/tests (31 pass, 15 fail): imported CSS/SSS whitespace snapshots plus a path-separator assertion. Full ESLint also has existing import-order errors in unchanged files (25 after the change). These are recorded rather than marking the full-suite checklist complete.

Checklist

  • Lint and unit tests pass with my changes
  • I have added tests that prove my fix is effective/works
  • I have added necessary documentation (if appropriate)

@ai

ai commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Does it real issue or just issuer found by LLM?

LLM found issues are not welcome here, please stop wasting my time.

This branch has not been deployed

No deployments
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.

2 participants