我想在scss中使用已定义的插件函数image_path我可以使用它吗 webpack
new webpack.DefinePlugin({
image_path: function(path) {
return '/images' + path;
}
})
css 文件是这个
.range {
&::-webkit-slider-thumb {
background-image: url($divum_image_path('practiceDifficultyRange.svg'));
background-size: 100rem;
}
&::-moz-range-thumb {
background: url($divum_image_path('practiceDifficultyRange.svg')) no-repeat;
}
}
答案 0 :(得分:1)
new webpack.DefinePlugin({
image_path: function(path) {
return '/images' + path;
}
})
无法在webpack中使用图像路径变量