alias.config.js 416 B

1234567891011121314151617181920
  1. /**
  2. * @author 梁安帝
  3. * @date 2022-3-3
  4. * @desc 只是为了让webstorm识别别名,无其它作用
  5. * */
  6. function resolve(dir) {
  7. return path.join(__dirname, dir)
  8. }
  9. module.exports = {
  10. resolve: {
  11. alias: {
  12. '@': resolve(__dirname, 'src'),
  13. '~@': resolve(__dirname, 'src'),
  14. '@views': resolve(__dirname, 'src/views'),
  15. '@components': resolve(__dirname, 'src/components')
  16. }
  17. }
  18. };