webpack4.x in use html-withimg-loader the html-webpack-plugin generates an error [solved]

Use html-withimg-loader packed pictures in html img introduced, very good, but there will webpack4.x and html-webpack-plugin conflict;

The reason is that file-loader upgrade, when the previous 4.2 is all right, now upgraded to 5.0 file-loader, so the need to use a configuration options file-loader's:

esModule:false
This would solve;

 

 

Guess you like

Origin www.cnblogs.com/webSong/p/12118595.html