This switches the behavior from returning early when PurgeCSS is disabled to instead wrap the addition of purgecss-webpack-plugin in the check for purgeCssEnabled returning true. This ensures the Webpack config is always properly passed through any custom webpack function in the Next.js config.
This switches the behavior from returning early when PurgeCSS is disabled to instead wrap the addition of
purgecss-webpack-plugin
in the check forpurgeCssEnabled
returning true. This ensures the Webpack config is always properly passed through any customwebpack
function in the Next.js config.