preboot / angularjs-webpack

A complete, yet simple, starter for AngularJS using webpack
MIT License
1.71k stars 658 forks source link

css in the picture packing problem #81

Open shaodahong opened 7 years ago

shaodahong commented 7 years ago

node -v v7.10.0

npm -v 4.2.0

webpack -v 2.5.0

I set up a div tag in app.html, give it a class box, and then I set this box background: url ('../ public / img / logo.png') no-repeat;

then i runnpm run build, Find the image packed in the root directory

Have you tried it? image

I hope that the picture resources can be unified in the img directory or a unified directory, because when I css too much in the picture when this is not well managed!

dslian commented 7 years ago

Well, you can use url-loader for img. see config outputPath