0
在开发之后,我有这样的结构:的WebPack CSS改变图像路径建立
- dist - contain the css bundle
- sass - style.scss
- js
- img
- index.html
在生产中,我有这样的结构:
- img
- some-hash.js
- some-hase.css
- index.html
因此,在发展自己的形象网址应该是相对于像这样的img文件夹:
background: url('../img/logo.jpg');
但是在生产中它应该是这样的:
background: url('img/logo.jpg');
我们如何解决这个问题与webpack或一般?