sass引入图片怎么用alias别名去引入?

soulninu
  • 68

为什么图片地址引不过去呢?
image.png
image.png

const path = require('path');
const { IgnorePlugin } = require('webpack');
function resolve(dir) {
  return path.join(__dirname, dir);
}
module.exports = {
configureWebpack: {
    resolve: {
      alias: {
        '@': resolve('src/'),
        // '~@': resolve(__dirname, 'src/assets/images'),
        images: resolve(__dirname, 'src/assets/images'),
        views: resolve('src/views'),
      },
    },
  },
}
回复
阅读 325
宣传栏