Skip to content

Update index.js #102

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

Merged
merged 1 commit into from
Feb 25, 2024
Merged

Update index.js #102

merged 1 commit into from
Feb 25, 2024

Conversation

chasewalden
Copy link
Contributor

Set ...postcss = true after exporting plugin

When using with postcss-load-config (i.e. from postcss-cli), the plugin is incorrectly loaded when using the non-require style

i.e. with:

// file: postcss.config.js
module.exports = {
  plugins: {
    'postcss-font-magician': {},
    'autoprefixer': {}
  }
}

Because the object has no keys, this prevents the plugin function from being called...
https://github.com/postcss/postcss-load-config/blob/170ec7735f9c1df2f81b068988d81d351fead0a1/src/plugins.js#L18-L26

... and since the postcss = true is overwritten ...

https://github.com/postcss/postcss-load-config/blob/170ec7735f9c1df2f81b068988d81d351fead0a1/src/plugins.js#L63-L64

... is never called

set `...postcss = true` after exporting plugin
@maxnordlund
Copy link

maxnordlund commented Feb 9, 2022

Would love to see this fixed. The title of the PR isn't super clear, but I believe this will fix Parcel usage as well, see #103 and #88.

@b1mind
Copy link

b1mind commented Mar 11, 2023

Would love to see this merged as it fixes for Vite too.

@romainmenke
Copy link
Member

Thank you!

@romainmenke romainmenke merged commit 4792030 into csstools:main Feb 25, 2024
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.

4 participants