Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Webpack: Duplicate imports on sass-loader, css-loader(modules: true)

This issue is not yet resolved and I need help here. HELP!

My Question is: How do you setup webpack sass-loader with css-loader, setup to do css modules, to prevent duplicate imports?

Can anyone point me out how can I start resolving this?

like image 813
Richard Domingo Avatar asked Nov 08 '22 10:11

Richard Domingo


1 Answers

optimize-css-assets-webpack-plugin

This is what finally ended up working for me. I swapped out the cssnano step from post-css, and let optimize-css-assets handle it for me.

Im guessing your project has long since shipped (I hope) but others who search for this might find it helpful.

like image 158
T to the J Avatar answered Dec 16 '22 14:12

T to the J