我已使用contenthash
配置了webpack caching:
{
test: /\.(png|jpe?g|gif|svg)$/,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[contenthash:7].[ext]',
outputPath: 'images',
publicPath: '/public/images',
},
},
],
},
如何在scss文件中引用这些哈希URL?
答案 0 :(得分:0)
css-loader
处理此问题。如果使用解析别名,请以url
开头~