1.安装path npm install path --save 2.vue.config.js中配置 const path = require('path') function resolve(dir) { return path.join(__dirname, dir) }