Webpack separates and packages the image referenced in css,css separately. How to solve this problem?

now my project is to package css and js separately, and the directory structure after packaging is the same as before.

before packing:

csscssimages../csscss../../

:

webpack.config.js


csscss

csscss

I would like to ask all the great gods, what can be done to solve this problem? Can you package the corresponding pictures into the corresponding folder? I am a webpack rookie, the configuration is a little messy, I hope you will forgive me!

Feb.28,2021

output configuration with a publicPath


path is the output path of all webpack files, and must be an absolute path

:outputjs,url-loaderHtmlWebpackPluginhtml
path

publicPath does not affect the path to the generated file

css

you need to add a publicPath if you want to do so

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1be255d-13b2e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1be255d-13b2e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?