1.在build 下面的webpack.base.conf.js
2.设置你想设置的文件夹名字代表的文件位置
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src'),
'src': path.resolve(__dirname, '../src'),
'pages': path.resolve(__dirname, '../src/pages'),
'common': path.resolve(__dirname, '../src/common'),
'vendor': path.resolve(__dirname, '../src/vendor'),
'components': path.resolve(__dirname, '../src/components'),
}
},
网友评论