不能识别@定位文件让本程序猿严重不适!!!
File -> Settings -> Languages & Frameworks -> webpack,勾选 Manually
方法一
Configuration file 设置为当前项目的node_modules/@vue/cli-service/webpack.config.js
方法二
自定义webpack.config.js,在Configuration file中引入
'use strict'
const path = require('path')
module.exports = {
context: path.resolve(__dirname, './'),
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
'@': path.resolve('src'),
'@assets': path.resolve(__dirname, 'src/assets'),
'@pages': path.resolve(__dirname, 'src/pages'),
'@comp': path.resolve(__dirname, 'src/components'),
'@api': path.resolve(__dirname, 'src/api'),
'@plug': path.resolve(__dirname, 'src/plugins'),
'@utils': path.resolve(__dirname, 'src/utils')
}
}
}