lucleray / next-purgecss

nextjs + purgecss for smaller css bundles
https://www.npmjs.com/package/next-purgecss
134 stars 8 forks source link

Modify branching logic around purgeCssEnabled #35

Closed mwdiaz closed 4 years ago

mwdiaz commented 4 years ago

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.