egoist / poi

⚡A zero-config bundler for JavaScript applications.
https://poi.js.org
MIT License
5.22k stars 255 forks source link

PostCSS version 8 support #765

Open jchamb opened 4 years ago

jchamb commented 4 years ago

Recently updated my PostCSS depends, most of them have been updated for v8 support, the internals of poi has not updated the depends yet so it throws a lot of complaints, and the build fails.

I tried forcing resolutions to update the versions included through Poi but than received config errors along the lines of:

Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
ValidationError: Invalid options object. PostCSS Loader has been initialized using an options object that does not match the API schema.
 - options has an unknown property 'config'. These properties are valid:
   object { postcssOptions?, execute?, sourceMap? }

Looks like the syntax needs to be updated for loading the config files for the newest version of postcss-loader.

https://www.npmjs.com/package/postcss-loader#string

I've downgraded for now but will dig for where this is being configured when I get a chance.

Update: Looks like the config, is actually coming from my loaderOptions in the poi config, which I was able to update. Would still need to get the dependencies updated as to not need to override with resolutions.