1.在根目录下新建 alias.config.js 文件
'use script' const path = require('path') function resolve(dir) { return path.join(__dirname, dir) } module.exports = { resolve: { alias: { '@': resolve('src') } } }
2.配置 IDEA - Preferences - Webpack - Manually 里,选择 alias.config.js 文件
3.如果没有立即生效。请重启 IDEA 生效。
标签:resolve,路径,IDEA,alias,跳转,path,config From: https://www.cnblogs.com/cynthia-wuqian/p/17347238.html