postcss-load-config
postcss-load-config copied to clipboard
doiuse with an empty configuration breaks (this bug possibly also breaks other plugins)
I'm trying to figure out two things:
- Why is this the way
postcss-load-configtreats empty configuration objects - Is this choice currently breaking more plugins?
All the context you need is in this pull request I just opened.
Minimal repro:
- Access https://stackblitz.com/edit/vitejs-vite-f8xwph
- Run
npm run build - Notice
doiuseis skipped without warning even thoughpostcss.config.jsis perfectly valid.
There is no specific policy. PostCSS is old project with big ecosystem and contains many parts—this is the result:
postcsshas bigifs 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)postcss-load-configwas written by other developer and some use case could be missed
So, suggest the solution.