Skip to content

refactor: extract postcss plugin to own file#830

Merged
james-elicx merged 1 commit intomainfrom
james/extract-postcss-plugin
Apr 13, 2026
Merged

refactor: extract postcss plugin to own file#830
james-elicx merged 1 commit intomainfrom
james/extract-postcss-plugin

Conversation

@james-elicx
Copy link
Copy Markdown
Collaborator

No description provided.

@james-elicx
Copy link
Copy Markdown
Collaborator Author

/bigbonk review

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 13, 2026

Open in StackBlitz

npm i https://pkg.pr.new/vinext@830

commit: fb2be3c

@github-actions
Copy link
Copy Markdown

Example Preview Production Original
app-router-cloudflare preview production
pages-router-cloudflare preview production
app-router-playground preview production original
realworld-api-rest preview production
nextra-docs-template preview production
benchmarks preview production
hackernews preview production original

Copy link
Copy Markdown
Contributor

@ask-bonk ask-bonk Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean extraction. Verified:

  • The logic in plugins/postcss.ts is identical to what was removed from index.ts (only naming changes: _postcssCachepostcssCache, _resolvePostcssStringPluginsUncachedresolvePostcssStringPluginsUncached, private function/const → named exports).
  • index.ts imports resolvePostcssStringPlugins from the new location and drops the re-exports (_resolvePostcssStringPlugins, _postcssCache).
  • Both test files now import directly from plugins/postcss.js using the public export names instead of the underscore-prefixed re-exports. No remaining references to the old names in the codebase.
  • The new file has its own node:path, node:fs, node:url, and node:module imports — no missing dependencies.
  • Follows the existing plugins/ directory convention alongside fonts.ts, og-assets.ts, etc.

No behavioral changes, no circular dependency risk.

@james-elicx james-elicx marked this pull request as ready for review April 13, 2026 09:06
@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented Apr 13, 2026

Reviewed and approved PR #830. The extraction is faithful — the PostCSS plugin resolution logic moved from index.ts to plugins/postcss.ts with no behavioral changes. The only differences are naming (dropping underscore prefixes since the functions are now proper public exports) and the new file carrying its own Node.js imports. Test imports correctly updated to point at the new module.

github run

@james-elicx james-elicx enabled auto-merge (squash) April 13, 2026 09:06
@james-elicx james-elicx merged commit 02bf531 into main Apr 13, 2026
32 checks passed
@james-elicx james-elicx deleted the james/extract-postcss-plugin branch April 13, 2026 09:08
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