To fix the Webpack build error caused by cssnano during CSS optimization, you can temporarily disable minimization.
Add this to your next.config.ts
webpack: (config) => {
config.optimization.minimize = false;
return config;
},
This resolved the issue for me, but it’s only a temporary fix.