const path = require('path') module.exports = { configureWebpack: { resolve: { alias: { // 设置 @ 指向 根目录 '@': path.resolve(__dirname, '/'), }, }, }, }