This repository was archived by the owner on Feb 3, 2020. It is now read-only.

Description
This is my postcss.config.js which is used with webpack.
const glob = require('glob-all');
const cssnanoConfig = {
preset: ['default', { discardComments: { removeAll: true } }]
};
module.exports = ({ file, options }) => {
return {
parser: options.enabled.optimize ? 'postcss-safe-parser' : undefined,
plugins: {
autoprefixer: true,
purgecss: {
content: glob.sync([
'app/**/*.php',
'resources/views/**/*.php',
'resources/assets/scripts/**/*.js',
]),
whitelistPatterns: [/^slick/],
},
cssnano: options.enabled.optimize ? cssnanoConfig : false,
},
};
};
But upon building I get this error:
Module build failed: ModuleBuildError: Module build failed: Error: Loading PostCSS Plugin failed: Cannot call a class as a function
Do you know what the problem is?
Many thanks