vue-cli4中没有webpack.base.conf.js文件。如何设置别名?感谢
在根目录名中创建文件:vue.config.js
module.exports = {
chainWebpack: config => {
// path import to example
const path = require('path')
// path config.resolve.alias or config.resolve.alias.store
config.resolve.alias = {
...config.resolve.alias,
'myAlias': 'pathAlias || actionAlias',
// My Example
'social': path.resolve(__dirname, '../Social')
}
}
}