From 600b78c098bb9c1d4b6135df146e5948c1baf07f Mon Sep 17 00:00:00 2001 From: David Pike <1872727+oddnavy@users.noreply.github.com> Date: Tue, 21 Apr 2020 22:51:16 +1000 Subject: [PATCH] fix postcss.config.js warnings (#12070) * update postcss.config.js to fix warnings Return empty array if the condition is not met to avoid a null/undefined PostCSS plugin. Related PR: https://github.com/zeit/next.js/pull/11366 * style: correct linting error --- examples/blog-starter/postcss.config.js | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/examples/blog-starter/postcss.config.js b/examples/blog-starter/postcss.config.js index 0daed9b0738d9..23ffee56ffe55 100644 --- a/examples/blog-starter/postcss.config.js +++ b/examples/blog-starter/postcss.config.js @@ -1,18 +1,21 @@ module.exports = { plugins: [ 'tailwindcss', - process.env.NODE_ENV === 'production' + ...(process.env.NODE_ENV === 'production' ? [ - '@fullhuman/postcss-purgecss', - { - content: [ - './pages/**/*.{js,jsx,ts,tsx}', - './components/**/*.{js,jsx,ts,tsx}', - ], - defaultExtractor: content => content.match(/[\w-/:]+(? + content.match(/[\w-/:]+(?