docs(README): use an array of plugins in the example config - #278
Merged
Merged
Conversation
postcss-loader marks the {Object} form of plugins as deprecated, and
the Examples config, which the webpack example loads, still used it.
Use an {Array} of required plugins, which postcss-load-config and
postcss-loader both accept, and note the deprecation next to the
{Object} form.
Closes postcss#224
Member
|
Thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #224.
postcss-loader marks the
{Object}form ofpluginsas deprecated ("will be removed in the next major release" in its README, for bothwebpack.config.jsandpostcss.config.js), and the config in the Examples section, which the webpack example loads, still used it. As suggested in #224, it now uses an{Array}:The plugins are required rather than listed by name (as in postcss-loader's own examples), because postcss-load-config rejects names in an
{Array}(Invalid PostCSS Plugin found at: plugins[0]). postcss-load-config and postcss-loader both accept this form, and both skipfalse. A note next to the{Object}form mentions the deprecation.I ran the old and the new config in
developmentandproductionthrough postcss-load-config 6.0.1 andmain(on a CSS file with@importand nesting, and on SugarSS with the README's{ parser: true, map: 'inline' }context) and through webpack 5.111.1 with postcss-loader 8.2.1 (on the CSS file). The output is identical in all 10 runs, and a control config withoutpostcss-nesteddiffers in all of them.