Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support postcss-import-url if configured #401

Merged
merged 4 commits into from
Sep 25, 2024

Conversation

wesleyboar
Copy link
Member

@wesleyboar wesleyboar commented Sep 25, 2024

Overview

If postcss-import-url plugin is in any config file, then move it to the front of the final config.

Why?

If postcss-import-url is not at the front of the final config (like postcss-import is), then remote content it imports will not be parsed by plugins configured before it.

Related

Changes

  • added logic to conditionally add a config object
  • added logic to conditionally modify a config object

Testing

  1. Have client add postcss-import-url.
  2. Verify final config has postcss-import-url hoisted to top.

UI

Tested via TACC/Core-CMS-Custom#293 at 3d836c9 for s-article-list.css.

(`postcss-import-url` should be at top of config, like `postcss-import`)
@github-actions github-actions bot added the feature A new feature or replacement of existing feature label Sep 25, 2024
@wesleyboar wesleyboar added the minor A feature in backward-compatible manner label Sep 25, 2024
- Search `plugins` object value for `postcss-import-url`, not root.
- Test for `postcss-import-url` key with basic older code.
@wesleyboar wesleyboar merged commit 34ffb0d into main Sep 25, 2024
@wesleyboar wesleyboar deleted the feat/support-postcss-import-url branch September 25, 2024 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature or replacement of existing feature minor A feature in backward-compatible manner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant