postcss-loader: Function config does not work in webpack 2 with postcss-loader 1.0.0
To use a function config, parseOptions
expects the typeof
of the options
to be a 'function'
, but that is not allowed by the webpack 2 schema.
https://github.com/postcss/postcss-loader/blob/master/index.js#L8-L11
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.module.rules[4].use[2].options should be one of these:
object | string
- configuration.module.rules[4].use[2] should be one of these:
string | object { loader?, options?, query? }
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 33 (28 by maintainers)
@ai ๐ tested it locally and your changes work fine, but can you wait maybe 1/2 days before release next minor ? ๐ final postcss-load-config needs onyl a few small fixes (mostly done) and testing for
e.g for postcss-sprites
The fixes and adding the above is really easy but Iโm again busy requesting church asylum for someone, itโs always extremely time consuming and when there is progress you need to be responsive quickly, itโs really damaging to the โflowโ currently, but bla bla bla ๐ , the issue for autoprefixer/css-loader docs refactoring is also pending and I would also like to find and experiment with aliases for
ctx.webpack
. But the latter could also be part of next minor and load-config is a patch anyways, so in case you donโt want to wait, go ahead ๐