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

doiuse with an empty configuration breaks (this bug possibly also breaks other plugins) #248

Open
LorenzoBloedow opened this issue Aug 11, 2023 · 1 comment

Comments

@LorenzoBloedow
Copy link

I'm trying to figure out two things:

  1. Why is this the way postcss-load-config treats empty configuration objects
  2. Is this choice currently breaking more plugins?

All the context you need is in this pull request I just opened.

Minimal repro:

  1. Access https://stackblitz.com/edit/vitejs-vite-f8xwph
  2. Run npm run build
  3. Notice doiuse is skipped without warning even though postcss.config.js is perfectly valid.
@ai
Copy link
Member

ai commented Aug 11, 2023

There is no specific policy. PostCSS is old project with big ecosystem and contains many parts—this is the result:

  1. postcss has big ifs block in plugins loading because we need to support PostCSS 8 plugins, PostCSS 7 plugins, old PostCSS plugins, plugins presets. Also plugins with options (plugin(opts)) and without (plugin)
  2. postcss-load-config was written by other developer and some use case could be missed

So, suggest the solution.

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

No branches or pull requests

2 participants