Skip to content

Commit

Permalink
fix(gatsby-plugin-sass): loosely check postCssPlugins (#27829) (#28037)
Browse files Browse the repository at this point in the history
(cherry picked from commit ac37599)
  • Loading branch information
vladar authored Nov 13, 2020
1 parent 537bc8f commit ae4c51e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-sass/src/__tests__/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ describe(`pluginOptionsSchema`, () => {
const { isValid } = await testPluginOptionsSchema(pluginOptionsSchema, {
implementation: require(`../gatsby-node.js`),
cssLoaderOptions: { camelCase: false },
postCssPlugins: [{ post: `CSS plugin` }],
postCssPlugins: [require(`autoprefixer`)],
sassRuleTest: /\.global\.s(a|c)ss$/,
sassRuleModulesTest: /\.mod\.s(a|c)ss$/,
useResolveUrlLoader: false,
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-sass/src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ exports.pluginOptionsSchema = function ({ Joi }) {
`Pass in options for css-loader: https://github.com/webpack-contrib/css-loader/tree/version-1#options`
),
postCssPlugins: Joi.array()
.items(Joi.object({}).unknown(true))
.items(Joi.any())
.description(`An array of postCss plugins`),
sassRuleTest: Joi.object()
.instance(RegExp)
Expand Down

0 comments on commit ae4c51e

Please sign in to comment.